Closed
Bug 7588
Opened 25 years ago
Closed 25 years ago
HTMLish class selectors should not be allowed in CSS for XUL
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Core
CSS Parsing and Computation
Tracking
()
VERIFIED
INVALID
People
(Reporter: dbaron, Assigned: peterl-retired)
References
Details
HTMLish class selectors (using a ".") should not be allowed in CSS for XUL. The CSS2 spec (section 6.8.3, I think) is quite clear on this. Any XML application other than HTML (which was the only thing to which CSS1 applied) should be required to use: element[class~="value"] { property: value; } (Most current XUL usage seems to use = instead of ~=.)
Assignee | ||
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
Assignee | ||
Comment 1•25 years ago
|
||
Sorry, beg to differ. Class selectors in CSS bind to any element that expresses the notion of class to the style system. XML does not have a mechanism to do this (yet), but HTML, XHTML and XUL do. This is perfectly legal. Within a given XML namespace we can define the notion of "class" any way we want to.
Reporter | ||
Comment 2•25 years ago
|
||
I do think the spec is pretty clear on this one: For style sheets used with HTML, authors may use the dot (.) notation as an alternative to the "~=" notation... (5.8.3) XHTML is HTML (since it is meant to be displayed on browsers that don't know XML). XUL is not. It does disturb me a bit to see this since XUL is going to be one of the first major public uses of XML+CSS. However, if you want it this way, that's your choice.
Comment 3•25 years ago
|
||
As far as I can tell, David is correct here. In a very early draft of CSS2: http://www.w3.org/TR/WD-CSS2-971104/selector.html#h-6.3.3 ...there was an "@class" rule which decided which attribute should be used to interpret the "." notation. This was removed from CSS2 in the early 1998 draft, which states, as does the final CSS2 specification, that the "." notation only applies to HTML (and by extension, XHTML).
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 4•25 years ago
|
||
Based on Peterl comments, verified bug invalid.
Comment 6•8 years ago
|
||
I think it works well right now in Firefox. See also https://github.com/w3c/csswg-drafts/issues/534
Comment 7•8 years ago
|
||
See also https://bugzilla.mozilla.org/show_bug.cgi?id=741295
You need to log in
before you can comment on or make changes to this bug.
Description
•