HTMLish class selectors should not be allowed in CSS for XUL

VERIFIED INVALID

Status

()

P3
normal
VERIFIED INVALID
20 years ago
2 years ago

People

(Reporter: dbaron, Assigned: peterl-retired)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

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

20 years ago
Status: NEW → RESOLVED
Last Resolved: 20 years ago
Resolution: --- → INVALID
(Assignee)

Comment 1

20 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

20 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.
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

20 years ago
Status: RESOLVED → VERIFIED

Comment 4

20 years ago
Based on Peterl comments, verified bug invalid.

Comment 5

2 years ago
Should we reopen this bug?

Updated

2 years ago
See Also: → bug 89982

Comment 6

2 years ago
I think it works well right now in Firefox. See also https://github.com/w3c/csswg-drafts/issues/534
You need to log in before you can comment on or make changes to this bug.