W3C home > Mailing lists > Public > www-style@w3.org > December 2011

Re: [css3-lists] minor issues

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Tue, 06 Dec 2011 11:39:06 +0100
Message-ID: <4EDDF0CA.40505@kozea.fr>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: "www-style@w3.org" <www-style@w3.org>
Le 06/12/2011 00:42, Tab Atkins Jr. a écrit :
>> 3. (Ok this one is not so minor and could be worth its own thread.)
>> >  What is the scope for @counter-type rules and how are name conflicts
>> >  handled? I’d guess they are global to the document being rendered and that
>> >  specified last wins, but some kind of cascade needs to be defined for rule
>> >  of different origin (UA, author, user).
> Ah, indeed.  I largely just copied the boilerplate from @font-face,
> and didn't realize the omission.  It works in the way you'd expect -
> the styles are global, and name conflicts are handled with standard
> cascade rules.  I've specified this now.

This could be made more explicit: counter styles cascade "atomically". 
Unlike properties in normal style rules, counter descriptors do not 
cascade. For example:

@counter-style my-counter { type: repeating; symbols: a b; }
@counter-style my-counter { symbols: c d; }

The second rule completely masks the first one and is of type symbolic, 
the initial value. It does not merge descriptors with the previous rules 
as other types of rule do with properties:

@page { margin: 2cm }
@page { padding: 1cm }


Also, for the 'override' type:

"""
If the specified counter style name isn't the name of any 
currently-defined counter style, it must be treated as if it was 
overriding the decimal counter style.
"""

Does "currently-defined" means "before in cascade order"? Example:

/* 'bar' is not defined before */
@counter-style foo { type: override bar; }
@counter-style bar { type: repeating; symbols: "-"; }

Finally, does 'override' take the current algorithm at this point of the 
cascade, or the one that eventually wins?

@counter-style bar { type: repeating; symbols: "*"; }
@counter-style foo { type: override bar; } /*which is it?*/
@counter-style bar { type: repeating; symbols: "-"; }
Received on Tuesday, 6 December 2011 10:39:55 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:47 GMT