Re: Excluding linked stylesheets on CSS validator?

Hey Jens,


2013/9/30 Jens O. Meiert <jens@meiert.com>

> > > 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.
>
>
Of course the CSS validator is working as intended, I didn't say it was
wrong.


> 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.)
>

Using external style sheets is a good practice, but including styles on the
same document is perfectly valid.

But, I'm not talking about this, I'm talking about options on the requests
to the CSS validator.

The CSS validator already gives you the validation report per each
individual resource. You give it the URL of a page, and it validates the
CSS in this document and on every linked style sheet, and the results tell
you the individual resources where the errors are found.

It's just that it would be easier if there was an option to exclude linked
style sheets, for the reasons given in my previous email.

There isn't such an option, that's all I need to know, I'll work around
this :)

Thanks!
Jaime

Received on Monday, 30 September 2013 11:58:24 UTC