Re: [css3-lists] minor issues

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 UTC