Closed
Bug 234508
Opened 21 years ago
Closed 21 years ago
First CSS-rule ignored at linked CSS stylesheet file
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
VERIFIED
INVALID
People
(Reporter: rav-spb, Assigned: dbaron)
Details
Attachments
(2 files)
User-Agent: Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 HTML file (mozilla_bug.html) links stylesheet file (simple.css) using code <link rel="stylesheet" href="simple.css" type="text/css">. HTML file contains code <h1 class="title">Styled title</h1> that uses CSS-rule '.title' defined at linked CSS-stylesheet. And this rule is the first in the 'simple.css'. During HTML rendering Mozilla didn't apply that CSS-rule to the tag <h1>. But applied the next CSS-rule '.text' defined in 'simple.css' to the code <p class="text">Styled text</p>. To solve the problem I had to add fake CSS-rule before all other rules to 'simple.css'. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Reporter | ||
Comment 1•21 years ago
|
||
Reporter | ||
Comment 2•21 years ago
|
||
Comment 3•21 years ago
|
||
SGML/XML is not allowed within a CSS file. Comments are ignored, so the first selector becomes: '<style> <!-- .title{ }', which obviously doesn't match anything in the document. -> INVALID
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Comment 4•21 years ago
|
||
indeed. you should not put <style> or <!-- into .css files. verified.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•