Closed Bug 158068 Opened 22 years ago Closed 21 years ago

Document :hover quirk

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: leonard, Assigned: dbaron)

References

()

Details

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 (http://www.mozilla.org/docs/web-developer/quirks/quirklist.html) 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
->Style system
Assignee: jst → dbaron
Component: DOM Style → Style System
Oops, tried it with the :focus pseudo-class and it looks like this problem only affects :hover. see: http://randomfoo.net/sandbox/mozilla/selector/quirks.html
This is a purposeful quirk to save pages that do things like ":hover{color: red}" and expect it to only apply to links. See http://lxr.mozilla.org/seamonkey/source/content/html/style/src/nsCSSStyleSheet.cpp#3639 David, we should probably add this to the quirk list.... Mind if I do that?
Status: UNCONFIRMED → NEW
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
Well, I'd been wondering if we really needed it, but we probably do.
Proposed change to the document: Add + <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="http://bugzilla.mozilla.org/show_bug.cgi?id=18817">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 attributes.</li> with the comment: Add :hover quirk to list; remove quirk from bug 18817, since the patch for bug 155421 removed the quirky code.
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.