Open Bug 605228 Opened 14 years ago Updated 2 years ago

a:active in user stylesheet doesn't work without !important

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

People

(Reporter: dbaron, Unassigned)

References

()

Details

(Keywords: css1, css2)

http://test.csswg.org/suites/css2.1/20101001/xhtml1/user-stylesheet-015.xht
http://test.csswg.org/suites/css2.1/20101001/html4/user-stylesheet-015.htm

a:active rules in the user stylesheet don't override 'color' unless they use !important; it seems like there's some rule at the author level that should be at the UA level.
There's a user stylesheet that styles *|*:-moz-any-link:active and comes after all other user sheets in the cascade: the preference sheet.  You can tell this apart from author rules by testing a higher-specificity selector in a user stylesheet and seeing whether it wins.

I do think it would make sense to PrependStyleSheet instead of appending in PresShell::CreatePreferenceStyleSheet.
Ah, that doesn't help, since *|*:-moz-any-link:active has higher specificity than a:active (because attributes rank higher than tagnames in the calculation).

So either this test is invalid or we need to move this rule out of the user level or we need to make it not use two separate pseudoclasses or something.
Yeah, I think the test is invalid.
And fwiw, looks like we initially set up the preference stylesheet before other user styles are added.  So I still think we should Prepend there, in case it needs to get rebuilt.
The given test url is out of date.
This is the good one: http://test.csswg.org/suites/css2.1/20110323/html4/user-stylesheet-015.htm#
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.