W3C home > Mailing lists > Public > www-style@w3.org > January 2013

Fwd: Case Sensitivity Issue and CSSOM

From: Glenn Adams <glenn@skynav.com>
Date: Tue, 22 Jan 2013 21:52:54 -0700
Message-ID: <CACQ=j+dj5aNfAk3_=NBHEoj_y4KZS+=uhUtUy0x9Ky7ETGOpsQ@mail.gmail.com>
To: W3C Style <www-style@w3.org>
Anyone able to provide IE response? See attached.

---------- Forwarded message ----------
From: Glenn Adams <glenn@skynav.com>
Date: Sun, Jan 20, 2013 at 8:42 PM
Subject: Re: Case Sensitivity Issue and CSSOM
To: fantasai <fantasai@inkedblade.net>

The primary ones are:

CSSStyleDeclaration.cssText
CSSStyleDeclaration.getPropertyValue()
CSSProperties2.{various}

e.g.

elt.style.cssText = 'counter-reset: TeSt';
alert(
  elt.style.cssText + "\n" +
  elt.style.getPropertyValue('counter-reset') + "\n" +
  elt.style.counterReset + "\n" +
  getComputedStyle(elt).getPropertyValue('counter-reset') + "\n" +
  getComputedStyle(elt).counterReset + "\n"
);

elt.style.cssText = 'list-style-type: DiSc';
alert(
  elt.style.cssText + "\n" +
  elt.style.getPropertyValue('list-style-type') + "\n" +
  elt.style.listStyleType + "\n" +
  getComputedStyle(elt).getPropertyValue('list-style-type') + "\n" +
  getComputedStyle(elt).listStyleType + "\n"
);

incidentally, the values returned above do not match between Safari,
Firefox, and Opera, though they are close:

Safari 6.0.2

counter-reset: TeSt 0;
TeSt 0
TeSt 0
TeSt 0
TeSt 0

list-style-type: disc;
disc
disc
disc
disc

Firefox 18.0.1

counter-reset: TeSt;
TeSt
TeSt
TeSt 0
TeSt 0

list-style-type: disc;
disc
disc
disc
disc

Opera 12.12

counter-reset: TeSt
TeSt
TeSt
TeSt
TeSt

list-style-type: DiSc
disc
disc
disc
disc

Although there are some minor differences between all of these three
browsers, it is clear that counter names are not case normalized but list
style types are case normalized, at least for the purpose of returning the
computed value.

I can't say if the same case normalization is used when performing
comparisons internally.

On Fri, Jan 18, 2013 at 4:59 PM, fantasai <fantasai@inkedblade.net> wrote:

> Hi Glenn!
> I was wondering if you could post a list of APIs that return
> CSS value keywords? I think it would be important to know
> what gets returned for
>   counter-reset: TeSt;
>   list-style-type: DiSc;
>
> I'm worried that we'll make a decision that works fine for
> matching within the CSS processing model, but creates problems
> when we start to integrate it with the CSSOM and JS.
>
> ~fantasai
>


Received on Wednesday, 23 January 2013 04:53:44 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:04 GMT