Re: [css-cascade] unwinding all: property

On Tue, Feb 17, 2015 at 7:13 PM, Marat Tanalin <mtanalin@yandex.ru> wrote:

> 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.
>

Very little is actually useless: give us a tool and we'll find a way to use
it, even if that wasn't the intended use.  I'm making no such claim that
you can't do useful things, I'm just saying that the current ones are
*less* useful things from the average author's perspective.  Since neither
of us is "the average author" and we don't have hard data, you can easily
make a counter argument that that's not so.   Let's not do that.  I don't
think it is of critical importance/worth wasting much time debating if we
agree that a 'default' or 'user-agent' value which does the thing it's safe
to say "a lot of authors" (i.e. 100% of the ones I know, which I concede
doesn't constitute an exceptionally large sample set) currently expect is
important/worth taking up.


-- 
Brian Kardell :: @briankardell :: hitchjs.com

Received on Wednesday, 18 February 2015 00:26:38 UTC