Closed Bug 292060 Opened 20 years ago Closed 20 years ago

html comments in css produces errors in js console

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: bugzilla, Assigned: dbaron)

Details

I'm wondering if this is an real error with the CSS or a bug in our CSS style system

going to:
http://www.google.com/firefox

I get:
Error: Selector expected.  Ruleset ignored due to bad selector.
Source File: http://www.google.com/firefox?client=firefox-a&rls=:en-US:official
Line: 3

this html code:
<style><!--
#frame {margin: 0 auto;}// -->
</style>

also produces errors:

Error: Selector expected.  Ruleset ignored due to bad selector.
Source File: file:///c:/temp/index.html
Line: 2

Error: Unexpected end of file while searching for 'closing } of invalid rule set'.
Source File: file:///c:/temp/index.html
Line: 3

while this is fine:
<style>
#frame {margin: 0 auto;}
</style>
While <!-- and --> should probably be ignored in text/html documents at the
start and end of the STYLE element, // is not valid within CSS. (It is in
javascript.)
That is correct behaviour. The "//" part is invalid, see CSS2.1 for details.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
I've reported the problem to google

http://www.google.com/support/bin/request.py?contact_type=user&hl=en
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.