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 8625 - Possibility not to resolve @import (and other URLs) during CSS validation
Summary: Possibility not to resolve @import (and other URLs) during CSS validation
Status: NEW
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: Parser (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-01-04 12:03 UTC by fd
Modified: 2010-01-04 12:03 UTC (History)
0 users

See Also:


Attachments

Description fd 2010-01-04 12:03:20 UTC
Description
-----
One may sometimes want to manage resources retrieval on its own, including resolution of @import rules, and run the CSS validator on each of the resources. As an example, the mobileOK Checker that performs various tests on the HTTP headers sent when stylesheets are retrieved, and thus already retrieves images and stylesheets that are referenced in the CSS content.

Additionally, as described in Bug 8624, there may be cases when the URL of the CSS content that is being validated is unknown.

In these cases, the caller does not want the CSS validator to resolve and retrieve URLs that appear in the CSS content, but merely to validate its syntax. There is no proper way to forbid the CSS validator from processing @import rules right now. The only way I am aware of is to provide the org.w3c.css.css.StyleSheetParser.StyleSheetParser#parseStyleElement method with a "file" URL, as the "file" scheme seems to be used to indicate that "direct input" was used, which is not so great.


Suggested functionality
-----
Add a validation flag that instructs the CSS validator to ignore URLs that appear in the CSS content when set.


Additional note
-----
This request for enhancement is somewhat related to Bug 8624 in that resolution of relative URIs that may be used in @import rules is de facto impossible if the base URL is not provided.