Use unset
Instead of Resetting All Properties
When resetting an element’s properties, it’s not necessary to reset each individual property:
button {
background: none;
border: none;
color: inherit;
font: inherit;
outline: none;
padding: 0;
}
You can specify all of an element’s properties using the all
shorthand. Setting the value to unset
changes an element’s properties to their initial values:
button {
all: unset;
}
Note: the all
and unset
shorthand isn’t supported in IE11.
当前内容版权归 AllThingsSmitty 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 AllThingsSmitty .