Closed Bug 146555 Opened 23 years ago Closed 22 years ago

Inactive link text is not formatted as specified in external CSS stylesheet

Categories

(Core :: Layout, defect, P2)

x86
Windows 2000
defect

Tracking

()

RESOLVED INVALID
Future

People

(Reporter: spadnos, Assigned: attinasi)

References

()

Details

(Keywords: testcase)

Attachments

(1 obsolete file)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc2) Gecko/20020510 BuildID: 2002051006 The links should be green, red when the mouse hovers over them. Also, the font size should be 18 point in both cases. In Mozilla, the text is "normal" size and style, until the mouse hovers over the link, at which time it takes the correct hover style. The link text never reverts to the correct non-hover style. Reproducible: Always Steps to Reproduce: 1.Load the page 2.Mouse over one of the links 3.Observe the changes. You can click on the "no error" link to see what should happen. The correct page works because the style information is inline. The same style info in an external style link does not work.
Changing QA contact to Amar
QA Contact: petersen → amar
Confirmed "A:hover" property of style does not work with the branch build: 20020522 on WIN2K. Moving this to STYLE SYSTEM.
Status: UNCONFIRMED → NEW
Ever confirmed: true
QA Contact: amar → madhur
Actually, the A:hover properties are correct. The "A" (non-hover) properties are not correct.
Priority: -- → P2
Target Milestone: --- → Future
Two things: 1) This problem still exists in Mozilla 1.1 2) The error URL (at adelphia.net) will probably go away sometime soon, since I will be moving and switching service providers. The site where I originally found the bug was http://www.pcnation.com . Their links usually exhibit the same problem. (I say usually because I did notice that they had inlined their styles for a while, when I was originally trying to figure out what the problem was :)
test.html draws a <p> paragraph and a <a> link formatted with the same CSS style. :hover is defined for both the <p> and the <a> to change the background color. The paragaph :hover is drawn correctly, the CSS style in the <a> is not.
Comment on attachment 103678 [details] Example of a CSS style in a <a> tag not being drawn properly. <html> <head> <title>This is a test page</title> <style type = "text/css"> p.test { width: 200; height: 25; } a.test2 { width: 200; height: 25; } p.test:hover { background-color: #a20000; } a.test2:hover { background-color: #a20000; } </style> </head> <body> <p class="test">This is a paragraph.</p> <a class="test2" href="http://mozilla.org">This is a link.</a> </body> </html>
Adding "position: absolute" to the style definition seems to fix the box problem. Relative or static positioning of a <a> element results in the box being drawn improperly.
Actually, I did some more testing, and it seems that the *FIRST* style defined in an external .css file is not loaded - all others are. Using a modification of your (Jeff Fernandez) code, and separating the style info into another file, I was able to isolate the issue. Here is the code: in file AnotherStyle.css: <style type="text/css"> p.test { color: #0000FF; background-color: #303030; } p.test:hover { color: #20C020; } a { color: #00AA00; } a:hover { color: #FF0000; background-color: #404040; } </style> in AnotherErrorPage.html: <html> <head> <title>This is a test page</title> <link rel="stylesheet" type="text/css" href="AnotherStyle.css"> </head> <body> <p class="test">This is a paragraph.</p> <a href="http://mozilla.org">This is a link.</a> </body> </html> With this version of the style sheet, the "test" class normal text is unmodified. If you swap the positions of the p.test and the p.test:hover properties, then the hover style is wrong, but the normal style is correct. (Sorry for inlining - I couldn't create an attachment with two files.) Incidentally, (Jeff), I think the problems you are pointing out are not related to this bug (except that they both relate to styles :)
A little more info: The DOM inspector lists only 3 styles for the stylesheet I posted earlier. (Makes sense to me - the DOM inspector should be using the same style-reading routines as the browser) Also, if I add an empty set of curly brackets (or a line like "bogus { }") before the first "real" style, then all of the subsequent styles are correctly set.
Comment on attachment 103678 [details] Example of a CSS style in a <a> tag not being drawn properly. Nevermind...
Attachment #103678 - Attachment is obsolete: true
Reproduced in 1/03/03 Trunk. Testcase keyword added.
Keywords: testcase
OK. Looks like in a year not one QA person looking at this actually knew any CSS.... In an external stylesheet, all data is parsed as style data. So the first rule in that sheet has the selector: '<STYLE TYPE="text/css"> <!-- A'. This is not a possible CSS2 (or CSS3 for that matter) selector, so we assume that it's a future version of CSS that we do not support (per CSS parsing rules) and drop the first rule in the sheet (since we could not parse its selector). This bug is invalid.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: