This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 18355 - The validator checks stuff inside /* comments */ in CSS.
Summary: The validator checks stuff inside /* comments */ in CSS.
Status: RESOLVED INVALID
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: HEAD
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-23 10:12 UTC by noboatc
Modified: 2012-07-28 10:01 UTC (History)
0 users

See Also:


Attachments

Description noboatc 2012-07-23 10:12:45 UTC
The validator checks stuff inside /* comments */ in CSS.

I had this line in CSS:

 font-size: 13px; /* same font size for page nums inside <h>, regular <p> or in the index */

then the validator gave me this error message:

Error Line 65, Column 63: element "h" undefined

…3px; /* same font size for page nums inside <h>, regular <p> or in the index */

If I make the comment a <!-- comment --> instead of a /* comment */, then it validates perfectly.  So I did that, and got criticized for putting an HTML-style comment in CSS!!
Comment 1 Ville Skyttä 2012-07-28 10:01:15 UTC
(In reply to comment #0)
> The validator checks stuff inside /* comments */ in CSS.

As it should. You can fix the validation error by writing your line like this:

font-size: 13px; /* same font size for page nums inside &lt;h&gt;, regular &lt;p&gt; or in the index */

...but it's often cleaner/better to just use external style sheets instead of ones inlined in HTML.