Closed Bug 224188 Opened 21 years ago Closed 21 years ago

selector html* parsed as html * (universal selector implies combinator)

Categories

(Core :: CSS Parsing and Computation, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla1.6beta

People

(Reporter: ian, Assigned: bzbarsky)

References

()

Details

(Keywords: css2)

Attachments

(1 file)

The following CSS:

   html* { color: red; }

...is not ignored. It should be. Those two type selectors have no combinator 
between them. See data: testcase in URL.
(broke out of opera bug 130146 -- opera used to have this bug too but recently 
fixed it)
Um, this used to be correct, and http://dbaron.org/css/test/univsel tests for
it.  Did the spec change, or are we now considering 5.5 to override the grammar
rather than the other way around?
Well, where's the combinator?
I propose invalid, based on CSS2.1
<http://www.w3.org/TR/CSS21/selector.html#descendant-selectors>:

>matches a P element that is a grandchild or later descendant of a DIV element.
>Note the whitespace on either side of the "*" is not part of the universal
>selector; the whitespace is the descendant selector indicating that the DIV must
>be the ancestor of some element, and that that element must be an ancestor of the
>P.
Oops, it is _correct_ based on CSS2.1. I think I mixed my comment up with the
things said in comment 2, sorry.
Attached patch Proposed patchSplinter Review
Comment on attachment 134738 [details] [diff] [review]
Proposed patch

As far as I can tell, both 5.5 and the CSS2.1 grammar agree with hixie here...

Note that the CSS2 grammar does NOT agree with either 5.5, Hixie, or the CSS2.1
grammar.  In CSS2, we have:

combinator
  : '+' S* | '>' S* | /* empty */
  ;

while in CSS2.1 we have:

combinator
  : PLUS S*
  | GREATER S*
  | S+
  ;

So in fact it looks like the spec changed...
Attachment #134738 - Flags: superreview?(dbaron)
Attachment #134738 - Flags: review?(dbaron)
Attachment #134738 - Flags: superreview?(dbaron)
Attachment #134738 - Flags: superreview+
Attachment #134738 - Flags: review?(dbaron)
Attachment #134738 - Flags: review+
Ah yes, that rings a bell. The CSS2 prose and syntax contradicted themselves, IIRC.
taking.
Assignee: dbaron → bz-vacation
OS: Windows 2000 → All
Priority: -- → P2
Hardware: PC → All
Target Milestone: --- → mozilla1.6beta
checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: