On Sat, Mar 27, 2010 at 1:55 AM, Markus Ernst <derernst@gmx.ch> wrote:
> A rather similar situation is possible already if you set an inappropriate list-style-type for the list-tag you chose:
>
> ul {
> list-style-type:decimal;
> }
>
> The spec should state in those cases which declaration has precedence. And it might be helpful for authors to display warnings in CSS validators (and in UA's error consoles), if this kind of ambiguities occur in the code.
I'm not sure what you mean. There's no ambiguity there. It's a
somewhat odd thing to do, but that declaration will cause your <ul> to
have numbered list elements. CSS doesn't care what type of list
you're trying to style.
To help you out, here's how precedence works, in the standard CSS model:
1. (weakest) browser styles and language presentational hints (like
presentational attributes)
2. user styles
3. author styles
4. styles appearing in @style attributes
5. !important author styles
6. (strongest) !important user styles
And then some rules have special rules that interact with this, like
::marker paying attention to list-style-type only if it has
content:normal.
So there's no ambiguity in the example you cited, because the <ul>
receives a list-style-type:disc; rule in the browser's style sheet,
and then you apply list-style-type:decimal in your author style sheet,
which overrules it.
~TJ