[css-cascade] !default declarations proposal · Issue #2272 · w3c/csswg-drafts (original) (raw)
!default
declarations, opposite to !important
declarations, could set a default property value, if it has not been set yet, or if another !default
declaration is more specific. User agent styles should be overridden with !default
(of course excluding ones with !important
).
Consider this example:
Style me!.new-theme button { border: thin solid black; }
button { border: 1px dotted grey !default; }
.default-theme button { border: none !default; }
The button would have a thin solid black border in result. Having the !default
declaration possible would make it so much easier to do theming or reset CSS.