Closed
Bug 177787
Opened 22 years ago
Closed 22 years ago
some css in usercontent.css does not get applied
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
VERIFIED
INVALID
People
(Reporter: asmith, Assigned: dbaron)
References
()
Details
As I understand it, if you give a css rule that uses the universal selector '* { csshere; }', and then give a rule after that which has a more specific selector, ie '* element { csshere; }', then the more specific rule should overrule the previous general/universal rule. If I have this wrong, feel free to mark this invalid.. Anyway, in usercontent.css, I have the following rules setup just so page authors can't annoy me by changing the cursors to ne-resize, etc: * { cursor: default ! important; } * input > * { cursor: text ! important; } * a, * a:link, * a:visited, * a:hover, * a:active { cursor: pointer ! important; } * > a, * > a:link, * > a:visited, * > a:hover, * > a:active { cursor: pointer ! important; } * a > * { cursor: pointer ! important; } * map > area { cursor: pointer ! important; } the first rule is there because the page authors i mentioned before actually apply { cursor: ne-resize; } to a LOT of elements, like body html div td p, and a few others i overlooked. i didn't want to keep editing this css sheet everytime i stumbled across another element people apply weird cursor css to, so i figured I would apply the universal rule first to cover all elements, and then use rules after that to change the cursor to i-beam, linking pointer hand, and such for the elements that normally have those cursors. the bug is that mozilla is ignoring the last rule, for imagemaps. with that first universal rule at the top, areas of a map element don't get the pointing finger cursor to indicate a link, the cursor remains unchanged as an arrow. i've tried '* map area', '* map > area', and '* map area[href]'. None of those selectors work.
Assignee | ||
Comment 1•22 years ago
|
||
We're getting the cursor property from the image, not from the area. Thus it seems like you need a rule such as: :link *, :visited *, img[usemap], object[usemap] { cursor: pointer ! important; } to supersede your next-to-last rule. You shouldn't select on "a" since it matches named anchors too, and you don't need the "* " at the beginning of any of the selectors.
Assignee | ||
Comment 2•22 years ago
|
||
I don't think CSS should apply to AREA elements since they're not really part of the rendering tree -- they can be used in multiple places or not at all. Our current UA stylesheet has area { display: none; } and I think that's correct. In other words, I don't think this is a bug in Mozilla. (Also see my previous comment.)
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
Thanks for clearing that up, David. Works fine now using the rule you gave.
You need to log in
before you can comment on or make changes to this bug.
Description
•