Re: [csswg-drafts] [css-counter-styles] range fallback is neither widely implemented nor sensible as specified

On Wed, 2018-03-28 at 13:05 -0700, Tab Atkins Jr. wrote:

> Removing range from the stylesheets doesn't make sense; styles like
> Armenian *are only defined* over certain ranges. The rule can
> technically generate higher values, but it would just be total
> nonsense.  If you wanted UAs to be able to do better than the
> specified range, that's something we could do with an explicit
> allowance, but the rule as written needs 'range'.

Sure - you end up with really insanely long long values if you try & go
too much higher. I'm trying to explore ways to avoid falling back to
roman where it's not needed, e.g. by allowing better behaviour if a UA
knows how to count higher, in a way that won't cause backward compat
problems later if the stylesheets are extended to higher numbers and
people were relying on fallback to roman.

Adding higher numbers to Armenian actually looks doable with the
current rule if I understand Armeniannumbers correctly - the larger
numbers have a bar over them like medieval roman numerals - although
you still run out eventually of course, and have to have lots of
repeats, so it's not a solution.


> We also still need some rule for what happens when a counter style
> simply *can't* generate a representation for a particular value, like
> an additive style where all the weights are even (can't generate
> reprs for odd values).  This falls back to decimal today, and I can't
> see any other possible way to do this.

I can't either - as Henry Spencer said, if you lie to the compiler, it
will get its revenge. If the UA *can't* do better, if there's no right
answer, all the answers are wrong. Falling back to "number out of
range" in the user's language might be an improvement actually.


-- 
Liam Quin, W3C, http://www.w3.org/People/Quin/
Staff contact for Verifiable Claims WG, SVG WG, XQuery WG
Improving Web Advertising: https://www.w3.org/community/web-adv/
Personal: awesome vintage art: http://www.fromoldbooks.org/


-- 
GitHub Notification of comment by liamquin
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2479#issuecomment-377021370 using your GitHub account

Received on Wednesday, 28 March 2018 20:16:10 UTC