Closed
Bug 44100
Opened 24 years ago
Closed 24 years ago
Cascading Rules for Link Pseudo Classes not observed.
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
VERIFIED
WORKSFORME
People
(Reporter: val, Assigned: pierre)
Details
From Bugzilla Helper: User-Agent: Mozilla/4.6 [en-gb]C-CCK-MCD NetscapeOnline.co.uk (Win98; I) BuildID: 2000061311 Quoting from CSS2: A:link { color: red } /* unvisited links */ A:visited { color: blue } /* visited links */ A:hover { color: yellow } /* user hovers */ A:active { color: lime } /* active links */ 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. Similarly, because A:active is placed after A:hover, the active color (lime) will apply when the user both activates and hovers over the A element. I find that, no matter in what order I list the above styles, the result is the same. Reproducible: Always Steps to Reproduce: 1.Create a simple case based on the CSS2 example: <head> <style> A:link { color: red } A:visited { color: blue } A:hover { color: yellow } A:active { color: lime } </style> </head> <body> <a href="#">text</a> </body> Observe that hovering makes the text yellow. Now try placing the A:hover rule before A:link rule. Actual Results: Observe that hovering still makes the text yellow, showing that cascading rules have not hidden the Hover style, as described in CSS2. Expected Results: Hover color hidden by either Link or Visited color.
Comment 1•24 years ago
|
||
This works for me... When I use the following: <head> <style> A:hover { color: yellow } A:link { color: red } A:visited { color: blue } A:active { color: lime } </style> </head> <body> <a href="#">Hover should not change the color because of cascade order...</a> </body> the link does not turn yellow when I hover over it (it is red unless I make it active, in which case it turns lime). If I put the A:active rule above the a:link rule then it will not turn lime. The cascade is correct. Reporter, please re-check your testcase and post a comment if you still believe it is a bug. Thanks.
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
Pleased to say, you are quite right. (Bug 44114 fooled me - ie. page won't reload after jumping to anchor unless one goes 'back' first. Which is why, on 'reloading' a new version with the rules reordered, the result appeared to be the same.)
You need to log in
before you can comment on or make changes to this bug.
Description
•