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

On 06/10/2013 03:20 AM, Tab Atkins Jr. wrote:
> fantasai wrote:
>> 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.

I think for a name like 'default', it should go back to whatever
that style sheet's author thinks of as the "default", i.e. set
before its origin. If we want to roll back the cascade in steps,
that might be a separate feature.

~fantasai

Received on Thursday, 13 June 2013 08:05:40 UTC