Closed
Bug 62075
Opened 24 years ago
Closed 24 years ago
The Body style tag does not get processed if it is included from a linked style sheet.
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
VERIFIED
INVALID
People
(Reporter: mark.scott, Assigned: pierre)
References
Details
Give the following example we get a page that all the style information is ignored, i.e. we get "some text" on a white page with normal margins. test.html <html> <head> <link rel="stylesheet" type="text/css" href="style.css" title="merlin style"> <body> some text </body> </html> style.css <style> <!-- BODY { margin-top: 100px; margin-right: 10px; margin-bottom: 10px; margin-left: 100px; background: red; } --> </style> but if we have a page, as below all works correctly. <html> <head> <style> <!-- BODY { margin-top: 100px; margin-right: 10px; margin-bottom: 10px; margin-left: 100px; background: red; } --> </style> <body> some text </body> </html>
Comment 2•24 years ago
|
||
Invalid. Mozilla is acting accordin to spec here. The <STYLE> tag and the <!-- --> comment are only allowed in stylesheets that are embedded in an HTML document. They are part of the HTML, not part of the style. Given your external style sheet as presented, the CSS parser correctly reads it as: <style> <!-- BODY { rules } Since "<style> <!-- BODY" is an invalid selector, the entire rule is thrown away. Removing the HTML from the external style sheet makes your example work fine.
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•