Closed
Bug 122979
Opened 23 years ago
Closed 23 years ago
:hover color and background attributes aren't inherited correctly
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
VERIFIED
INVALID
People
(Reporter: jens-erik_weber, Assigned: dbaron)
References
()
Details
(Keywords: css2, testcase)
I have defined background and color for a:hover in a CSS.
Then there is a <div class="box"> with overwritten background and color
attributes for a:link and a:visited, while the color & background for a:hover
and a:active are not overwritten, so they should have the general assigned
values, i.e. the colours of the link should change, but they don't in Mozilla
0.97 for Linux and Windows, in Opera 6.0 TP 1 they do.
If you don't assign any of the values for "box a:link", "box a:visited", "box
a:hover" and "box a:active", the general assigned values apply and work
correctly. See 2nd alternate stylesheet in my testcase.
If you assign all of the values for "box a:link", "box a:visited", "box a:hover"
and "box a:active", then these overwritten values apply and work correctly. See
3rd alternate stylesheet in my testcase.
But overwriting only "box a:link", "box a:visited" without overwriting "box
a:hover" and "box a:active" doesn't work. I haven't tried other combinations
(and I don't have time for it).
Reporter | ||
Updated•23 years ago
|
Comment 1•23 years ago
|
||
That's because hover is not currently hierarchical
*** This bug has been marked as a duplicate of 5693 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 2•23 years ago
|
||
Why is this a duplicate. Rather...
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Assignee | ||
Comment 3•23 years ago
|
||
... it's INVALID. The selector ".box a:link" has higher specificity than any
a:hover so it overrides it. MSIE has incorrect behavior where it doesn't treat
selectors with :hover according to the normal specificity rules.
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → INVALID
Comment 4•23 years ago
|
||
Reporter, CSS2 spec
http://www.w3.org/TR/REC-CSS2/selector.html#dynamic-pseudo-classes says:
"Note that the A:hover must be placed after the A:link and A:visited rules,
since otherwise the cascading rules will hide the 'color' property of the
A:hover rule."
Also hover.css has an error at line 11.
Status: RESOLVED → VERIFIED
Comment 5•23 years ago
|
||
Err whoops, my bad. Been a rough week for me :(
You need to log in
before you can comment on or make changes to this bug.
Description
•