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 10124 - Invalid @charset declaration may return weird error messages
Summary: Invalid @charset declaration may return weird error messages
Status: NEW
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: CSS 2.1 (show other bugs)
Version: CSS Validator
Hardware: PC Linux
: P2 enhancement
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: 2010-07-09 16:18 UTC by fd
Modified: 2012-09-21 14:33 UTC (History)
1 user (show)

See Also:


Attachments

Description fd 2010-07-09 16:18:01 UTC
An invalid @charset declaration at the beginning of a style sheet may trigger "weird" error messages.

For instance:
@charset="utf-8";
body { margin: 1em; }

... will return two errors:
- Parse Error @charsetnull;
- The @charset rule may only occur at the start of the style sheet. Please check that there are no spaces before it. @charset="utf-8";

The first error is good but the "null" should be removed.
The second error is probably a collateral damage. It is a bit misleading, but well, no big deal if it cannot be avoided.

Not sure what component is in cause here.