Re: [css3-cascade] Unclear what 'default' does

On 15/01/2013 00:50, Tab Atkins Jr. wrote:
> On Mon, Jan 14, 2013 at 12:55 PM, Anton Prowse <prowse@moonhenge.net> wrote:
>> The css3-cascade WD of 2013-01-03 says, in 4.3.3:
>>
>>    # If the cascaded value is the ‘default’ keyword, then the origin
>>    # level to which it belongs is discarded from the cascade, resulting
>>    # in a new cascaded value.
>>
>> I honestly don't understand what it means to "discard" an origin level from
>> the cascade!  Please can somebody explain (by way of example), as well as
>> clarify the spec (by way of new prose). :-)
>
> I've fixed the spec by amending that sentence to "then all
> declarations in the origin level to which it belong...".

Great, that's clear now.

> I still need to add an example (was asked to a long time ago by Daniel).

OK.

>>    # For this purpose, all author-originating styles (author and
>>    # override, both normal and important) are treated as belonging to
>>    # the same origin level.
>>
>> I'm confused by what, precisely, an origin is.  I think it's because the
>> "Origin" subsection of 4.2, and 4.2.1, contradict each other.  Is an origin
>> a function of !important, or not?
>
> Clarified.  4.2.1 now talks about !important origins, and points to
> the list in 4.2 as the normative list of CSS origins.

Great.  I'll just suggest that

   # In addition, several origins have twin origins defined the same
   # way, but which contain the ‘!important’ rules.

become

   | In addition, several origins each have a twin origin, which is
   | defined the same way but which contains the ‘!important’ rules.

(I don't know why exactly, but I found the existing sentence hard to parse.)


>> I assume that if 'default' is used in a /user/-originating style, the origin
>> to be "discarded" is a function of !important, and so 'default' is less
>> powerful in the User context than in the Author context.  Is that correct?
>
> Now that the normative list of origins is clarified, this should be
> obvious (yes).  We may end up still tweaking the way we group origins
> for 'default' - I've added an issue to track it.

Cool, thanks for the clarification.

Cheers,
Anton Prowse
http://dev.moonhenge.net

Received on Wednesday, 23 January 2013 09:40:26 UTC