Re: [css3-cascade] Rolling back the cascade and 'default'

On Sun, Jun 9, 2013 at 6:43 PM, fantasai <> wrote:
> I was just thinking about some of dbaron's comments on 'default' from
> the F2F, specifically about whether the two user levels (normal and
> !important) were grouped together for the purpose of cascade rollback.
> Currently in the spec they're not, but thinking about it I realize
> that perhaps that's not reasonable.
> Consider in the user style sheet:
>   :link { color: default; }            /* resets to UA default color */
>   :link { color: default !important; } /* says to use the author's choice */
> The declaration substantially changes meaning when we add !important
> here, and that probably doesn't make much sense. Thoughts?

It seems difficult to tell what the intent is.  Unlike
author-important, which can just be treated like a fourth level of
specificity, higher than #id, user-important is substantially
different from user.  User-level just sets defaults, which are used
when the author doesn't set anything else; user-important sets
*mandates*, which can't be overridden by the author at all.  It seems
reasonable that a user may want to reset their "mandates" without
resetting their "defaults".

On the other hand, it also seems reasonable that a user might want to
use the "default" semantics to indicate that they really, really want
the user-agent defaults for something, such that it should wipe out
*everything* between user and user-important, including the author
levels.  This preserves dbaron's desired invariant that the dropped
origins are contiguous.

So, dunno which might be more reasonable.


Received on Sunday, 9 June 2013 18:21:38 UTC