Re: Excluding linked stylesheets on CSS validator?

> > Just out of curiosity, what’s the benefit of this, or what particular
> > use case do you see for this?
>
> The use case for this is site-wide validation. When you're validating
> multiple pages of the same site, you'd rather see the CSS errors reported
> for the exact resource they appear on.

Almost forgot to keep riding this horse. From my understanding the CSS
validator is working as intended. You give it a style sheet or a
document and it validates all styles it can find.

The use case you’re describing should really only apply to unique
pages, that is, pages whose styling is not reused on other pages and
which thus use only internal styles for *performance* reasons. Other
than that, styles should normally *always* go into external style
sheets. This is to benefit from what is CSS’s key strength,
maintainability [1].

So from a conceptual angle, you never want to validate documents
because documents should not include any styling rules. (And the CSS
validator would only pull the style sheet URL then, which could of
course be fed directly.)

I hope Nick helped on the practical side of things but that just as
some extra perspective.


[1] http://meiert.com/en/blog/20090617/maintainability-guide/

-- 
Jens O. Meiert
http://meiert.com/en/

Received on Monday, 30 September 2013 00:13:01 UTC