Re: [css-cascade] unwinding all: property

18.02.2015, 02:15, "Brian Kardell" <bkardell@gmail.com>:
> Basically: everything will look like a span.
> see http://codepen.io/bkardell/pen/LEdNbY

Resetting all _properties_ does not mean that you must do this for all _elements_ with universal selector. The universal selector should always be used carefully.

And the need to restore `display` to `block` after applying `all: initial` is probably a minor issue compared with manual "resetting" of each of properties (especially when it's unknown in advance what properties are actually set for specific elements -- this is often the case for external widgets) and accompanying them with `!important` to be sure that they will actually be reset.

Being able to reset all properties at once for specific elements with `all: initial` is invaluable. And this is not mutually exclusive with being able to reset styles of specific elements to browser defaults if needed (I have no objections to adding something like `all: default` to the spec though that would probably be of limited usefulness given that different browsers have different default styles -- e.g. font sizes for headings).

In other words, the existing `all: initial / unset` feature is not wrong or useless, just a value (like `default`) for behavior you need is not yet specced.

Best regards.

Received on Wednesday, 18 February 2015 00:14:20 UTC