[Bug 27860] unordered lists with invalid list-style-type should not render as ordered lists

https://www.w3.org/Bugs/Public/show_bug.cgi?id=27860

--- Comment #1 from Tab Atkins Jr. <jackalmage@gmail.com> ---
Unfortunately, this problem is unavoidable with current properties.

Previously, when the set of counter-styles was defined by the language, we
could tell at parse time whether the value was valid or not, and reject the
declaration if it was invalid.  That gave you the older behavior, of still
using bullets or numbers, as it could fall back to the UA stylesheet.

With the introduction of @counter-style, though, we can't do that any longer. 
The set of valid counter style names isn't known at parse-time, as it depends
on other rules in the stylesheet (or in other stylesheets, perhaps from
different domains).  Thus, we can't reject an unknown value at parse time and
fall back any longer.

If we can't fall back, then there needs to be *some* defined behavior for what
to do when, at run-time, we find out the counter-style name is invalid.  For
lack of a better option, and for consistency with a few other bits, I chose to
default it to "decimal".  We can't change fallback for "ordered" or "unordered"
lists, because that information doesn't exist for CSS.  At best, we have
tagnames, which is a hacky HTML-specific solution that doesn't work well.

There is, potentially, a way around this - we could add an additional property
defining whether something is semantically an ordered or unordered list.  Its
sole purpose would be to have the UA stylesheet set it on <ol> and <ul>, and
then have the "what to do if the name is invalid" algorithm look at it to tell
whether to default to bullets or numbers.  I'll start a thread on www-style
about this.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 20 January 2015 20:53:17 UTC