On Fri, 13 Apr 2001, Andy Sy wrote:
> >> Would it be wise to support the shortcut '.' notation for XML
> >> CSS handling in Mozilla? IE doesn't support the correct CSS2
> >> form for this. And you know how a lot of people out there use
> >> it as the primary test of display correctness due to its
> >> dominance...
>
> >In my opinion, no. If you support one feature "because IE does it",
> >you go down a slippery slope that ends in "lets copy IE".
>
> How about if this shortcut '.' notation gets included
> in the next CSS spec (and gets implemented in Mozilla
> asap)? Seems like a pragmatic way to go about it unless
> it ruins or makes inelegant some aspect of CSS.
Oh, it's in the spec already -- but each namespace has to explicitly say
what attribute is going to be mapped to ".". Mozilla supports that on XUL
and XHTML.
Imagine you had a markup language "School Timetable ML":
<period class="english" start="9am" type="exam book mandatory"/>
<period class="science" start="10am" type="homework optional"/>
<period class="social science" start="3pm" type="exam homework"/>
...where the "class" attribute is a string, and the type attribute is a
space separated list of keywords. Here, you would want to be able to do
things like:
period.exam { background: red; }
period.optional { -moz-opacity: 0.5; }
period.homework:after { content: url(homework.png); }
...however you would NOT want this:
period.science { background-image: url(chemicals.png); }
...to affect the "social science" class... after all, "social science" is
not the same as just "science".
By saying that all "class" attributes in all namespaces are automatically
mapped to the "." notation, you therefore cripple languages like this.
HTH,
--
Ian Hickson )\ _. - ._.) fL
Netscape, Standards Compliance QA /. `- ' ( `--'
+1 650 937 6593 `- , ) - > ) \
irc.mozilla.org:Hixie _________________________ (.' \) (.' -' __________