[internal -> laszlo-dev, since this is an OL issue]
On 2007-08-16, at 16:58 EDT, James Robey wrote:
In the process of cleaning up the CSS [...] the question arose as
to whether or not "assignments" - the statements inside of a css
block - are case-sensitive. The following bit of test code, under
3.40, shows that it is case-sensitive:
<canvas proxied="false" debug="true">
<stylesheet>
view{
bgcolor:#ff00f0;
}
</stylesheet>
<view bgcolor="$style{'bgcolor'}" width="100" height="100">
<text>hi there</text>
</view>
</canvas>
if the "bgcolor" assignment is changed to"BGcolor", the css no
longer works. Can anyone state whether this is the way it is
supposed to be? Logically, it seems like considering everything in
CSS as case-sensitive is fine, but if it's not the way it's
supposed to be then I can file it as a bug.
We want to obey the CSS spec unless we have good cause not to:
http://www.w3.org/TR/REC-CSS2/syndata.html#q4
says that _CSS_ is case-INsensitive, but that HTML is case-
sensitive. By the same token, LZX is case-sensitive, so when
specifying an LZX id, name, or tag in your CSS style sheet, I would
say we should be case sensitive, but when specifying a CSS attribute,
we should not. So:
View{bgcolor: ...}
should not affect <view> tags, but:
view{BGCOLOR: ...}
should affect a view with a $style{'bgcolor'} constraint.
(LZX <view> and <View> are not equivalent. This is an intentional
difference between LZX and HTML.)
So, yes, IMO, your test demonstrates a bug in our CSS implementation.