Spotting missing styles

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Not sure if this is possible, but thought I would ask.

Is it possible to somehow check for missing styles in document.  I am
thing that if a webpage loads and the style is not in the stylesheet
then something happens.  Warning on the page for example.

Any pointers would be appreciated


Re: Spotting missing styles wrote:

Quoted text here. Click to load it

Such a check does (generally) not really make sense. Both the ID and the
CLASS attributes can be used for other purposes than CSS.
Perhaps there is a tool that performs such a check - but the result would
only be useful to people who restricts themselves to have at least one
matching rule in their CSS for every class and id in the document.

CSS is about the (mostly visual) rendering of a document. Programmatically
checking the CSS for correctness (= produces the intended result) is close
to impossible. So you're left with manual testing anyway - if there is a
rule 'missing' the document will not look (or sound) as you intended. I
can't think of a useful way that some piece of software could free you from
such manual checks.

Benjamin Niemann
Email: pink at odahoda dot de
WWW: /

Re: Spotting missing styles

Gazing into my crystal ball I observed writing

Quoted text here. Click to load it

Bradsoft's TopStyle has the ability to show orphaned classes.  You could
check the orphans against the document and perhaps find missing styles
that way.  For example, class="something" and .somethng would not match,
and somethng would show up as an orphan.

Adrienne Boswell
Please respond to the group so others can share

Re: Spotting missing styles

What I ended up doing was using JavaScript to get the styles in the
document, and then see if that style is in the stylesheet.  Seems to


Site Timeline