CSS Parsing and Computation
16 years ago
15 years ago


(Reporter: leonard, Assigned: dbaron)



Firefox Tracking Flags

(Not tracked)





16 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1a+) Gecko/20020715
BuildID:    2002071508

When in Quirks mode, the follow selector:
  *:{pseudo-class} ex *:hover
won't work, while a specific tag selector will:
  tag:{pseudo-class} ex b:hover

This isn't documented in the Quirks List
( and seems like
a bug.  The included URL has links to the same CSS code (one in strict mode, one
in quirks mode)

Reproducible: Always
Steps to Reproduce:
1. Visit Page w/ said combination of selectors and quirks mode
2. View CSS not work

Actual Results:  CSS does not work

Expected Results:  CSS should work

Comment 1

16 years ago
->Style system
Assignee: jst → dbaron
Component: DOM Style → Style System

Comment 2

16 years ago
Oops, tried it with the :focus pseudo-class and it looks like this problem only
affects :hover.  see:
This is a purposeful quirk to save pages that do things like ":hover{color:
red}" and expect it to only apply to links.  See

David, we should probably add this to the quirk list....  Mind if I do that?
Ever confirmed: true
OS: Windows 2000 → All
Hardware: PC → All
Summary: CSS2 Selector bug in Quirks mode (universal selector and pseudo-class combination) → Document :hover quirk

Comment 4

16 years ago
Well, I'd been wondering if we really needed it, but we probably do.
Proposed change to the document:


+                        <li>The <code>:hover</code> pseudoclass will only be
applied to links unless the selector includes
+                            tag names, classes, or attributes.</li

at the end of the "Miscellaneous & Style" section.

David, that seem reasonable?
I've checked in the following change:

-			<li>For <a href="">bug
18817</a>, quirks mode was intended to accept stylesheets in certain cases when
strict mode did not, but the code has since gotten somewhat mangled and doesn't
seem to have much point anymore.</li>
+			<li>The <code>:hover</code> pseudoclass will only be applied to links,
images, and form controls, unless the selector includes tag names, ids, or

with the comment:

  Add :hover quirk to list; remove quirk from bug 18817, since the patch for bug
  155421 removed the quirky code.
Last Resolved: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.