Re: Fwd: Case Sensitivity Issue and CSSOM

On 24 January 2013 18:05, Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> On Thu, Jan 24, 2013 at 7:17 AM, Simon Sapin <simon.sapin@kozea.fr> wrote:
> > Le 23/01/2013 23:37, fantasai a écrit :
> >> Given this, I'm leaning towards Richard Ishida's (?) suggestion that we
> >> leave user-defined idents as case-sensitive and just grandfather in any
> >> CSS-defined keywords as computing to their lowercase variants.
> >>
> >> This would mean that
> >>     @counter-style DISC { ... }
> >>     e { list-style-type: DISC; }
> >> turns into
> >>     @counter-style disc { ... }
> >>     e { list-style-type: disc; }
> >> in the CSSOM even though
> >>     @counter-style FOO { .. }
> >>     e { list-style-type: FOO; }
> >> retains its casing.
> >
> > What about this?
> >
> >    @counter-style DISC { ... }
> >    e { list-style-type: disc; }
>
> Given that "disc" is a built-in type, fantasai's desired behavior
> means that those two would indeed sync up - the @counter-style rule
> would override the "disc" type, and the 'list-style-type' property
> would then reference it.
>

How would this work for vendors that implement the css3-counterstyles spec
and pull in a counterstyles.css file to get the default counter styles?
That is, does the above mean that implementors of css3-counterstyles will
still need to handle CI of the built-in counter styles even if everything
else about them is handled generically?

If the pre-defined counter styles are CI, are the user-defined counter
styles as well? For example, are the following identical:

   @counter-style ogham { system: additive; ... }
   @counter-style OGHAM { system: additive; ... }

If they are different and disc vs DISC are the same, this means that a UA
will need to handle counter styles differently depending on context, which
will complicate the implementation.

If this is the case, are the following treated identically:

    p.disc { color: red; }
    p.DISC { color: blue; }

given that they use the disc keyword but are not used in a counter style
context.

> I’m not sure what’s the exact behavior you mean. Is it as follows?
> > "Iff a <counter-style-name> value is an ASCII case-insensitive match for
> one
> > of the 14 CSS 2.1 values, normalize to ASCII lower case. Otherwise use
> the
> > ident value as parsed."
>
> Yes, I believe that's what she's referring to.
>

This would mean that an implementation of css3-counterstyles would not then
be completely generic w.r.t. spec-defined counter styles and user-defined
counter styles. This seems counter to what the counter styles spec is
trying to achieve: that is, have counter styles expressed purely in CSS
without any UA logic (ignoring the more complex variants of the East Asian
and Ethiopic counters).

Also, css3-counterstyles WD defines 30 counter styles. Does this mean that
the 14 found in CSS 2.1 are normalized to ASCII lower case, but the other
16 are not?

Thanks,
- Reece

Received on Thursday, 24 January 2013 18:41:14 UTC