HighDots Forums  

any utility to list undefined CSS classes?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss any utility to list undefined CSS classes? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
wolfing1@gmail.com
 
Posts: n/a

Default any utility to list undefined CSS classes? - 09-07-2006 , 09:41 AM






Is there a way to see what CSS classes in a page are not defined? (like
if I want to find mispelled class names, etc)


Reply With Quote
  #2  
Old   
Art
 
Posts: n/a

Default Re: any utility to list undefined CSS classes? - 09-07-2006 , 10:09 AM






On 9/7/06 9:41 AM, wolfing1 (AT) gmail (DOT) com wrote:

Quote:
Is there a way to see what CSS classes in a page are not defined? (like
if I want to find mispelled class names, etc)

Try using the W3C CSS validator at:

http://jigsaw.w3.org/css-validator/

It has input options for either file or pasting of the css source of
interest.

There's an equivalent for HTML at:

http://validator.w3.org/

HTH...

Art


Reply With Quote
  #3  
Old   
wolfing1@gmail.com
 
Posts: n/a

Default Re: any utility to list undefined CSS classes? - 09-07-2006 , 11:57 AM




Art wrote:
Quote:
On 9/7/06 9:41 AM, wolfing1 (AT) gmail (DOT) com wrote:

Is there a way to see what CSS classes in a page are not defined? (like
if I want to find mispelled class names, etc)

Try using the W3C CSS validator at:

http://jigsaw.w3.org/css-validator/

It has input options for either file or pasting of the css source of
interest.

There's an equivalent for HTML at:

http://validator.w3.org/

HTH...

Art
Hmm... maybe I didn't check the correct option, but I tried it, and one
said the HTML is valid (it syntactically is I guess) and the other said
the CSS is valid (hundreds of warnings about classes not defining
background colors and stuff though)... but none of the options I tried
would tell me that 'yomomma' was not defined for '<div class="yomomma">'



Reply With Quote
  #4  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: any utility to list undefined CSS classes? - 09-07-2006 , 12:14 PM



wolfing1 (AT) gmail (DOT) com wrote:

Quote:
Art
Hmm... maybe I didn't check the correct option, but I tried it, and one
said the HTML is valid (it syntactically is I guess) and the other said
the CSS is valid (hundreds of warnings about classes not defining
background colors and stuff though)... but none of the options I tried
would tell me that 'yomomma' was not defined for '<div class="yomomma">'
Your question wasn't clear. Classes aren't "defined". You can designate
classes for elements in your HTML document. In CSS, you can associate
styles with none, some, or all of the classes you have used in your HTML
document, as well as with classes that you may not have used at all in a
particular HTML document.

I think what you're asking is whether, *assuming* that the only reason
you're assigning elements to classes is to have styles applied to them,
you want a list of classes that have been assigned but that are not
referenced in any of the selectors in any of the stylesheets linked to
your document. This will reveal any classes that you have either
mistyped or neglected to style. Is that it?


Reply With Quote
  #5  
Old   
wolfing1@gmail.com
 
Posts: n/a

Default Re: any utility to list undefined CSS classes? - 09-07-2006 , 02:07 PM




Harlan Messinger wrote:
Quote:
wolfing1 (AT) gmail (DOT) com wrote:

Art
Hmm... maybe I didn't check the correct option, but I tried it, and one
said the HTML is valid (it syntactically is I guess) and the other said
the CSS is valid (hundreds of warnings about classes not defining
background colors and stuff though)... but none of the options I tried
would tell me that 'yomomma' was not defined for '<div class="yomomma">'

Your question wasn't clear. Classes aren't "defined". You can designate
classes for elements in your HTML document. In CSS, you can associate
styles with none, some, or all of the classes you have used in your HTML
document, as well as with classes that you may not have used at all in a
particular HTML document.

I think what you're asking is whether, *assuming* that the only reason
you're assigning elements to classes is to have styles applied to them,
you want a list of classes that have been assigned but that are not
referenced in any of the selectors in any of the stylesheets linked to
your document. This will reveal any classes that you have either
mistyped or neglected to style. Is that it?
Exactly. Many times I found that I typed something like <div
class="Productheader"> but the class in the css as I wrote it was
..productheader {...} (lowercase P). Sometimes it's obvious, but
sometimes it is not. Was hoping there was some utility or something
that would tell what classes weren't found in the style sheets applied.



Reply With Quote
  #6  
Old   
David Stone
 
Posts: n/a

Default Re: any utility to list undefined CSS classes? - 09-07-2006 , 02:18 PM



In article <1157652460.669494.221840 (AT) i3g2000cwc (DOT) googlegroups.com>,
wolfing1 (AT) gmail (DOT) com wrote:

Quote:
Harlan Messinger wrote:
wolfing1 (AT) gmail (DOT) com wrote:

Art
Hmm... maybe I didn't check the correct option, but I tried it, and one
said the HTML is valid (it syntactically is I guess) and the other said
the CSS is valid (hundreds of warnings about classes not defining
background colors and stuff though)... but none of the options I tried
would tell me that 'yomomma' was not defined for '<div class="yomomma">'

Your question wasn't clear. Classes aren't "defined". You can designate
classes for elements in your HTML document. In CSS, you can associate
styles with none, some, or all of the classes you have used in your HTML
document, as well as with classes that you may not have used at all in a
particular HTML document.

I think what you're asking is whether, *assuming* that the only reason
you're assigning elements to classes is to have styles applied to them,
you want a list of classes that have been assigned but that are not
referenced in any of the selectors in any of the stylesheets linked to
your document. This will reveal any classes that you have either
mistyped or neglected to style. Is that it?
Exactly. Many times I found that I typed something like <div
class="Productheader"> but the class in the css as I wrote it was
.productheader {...} (lowercase P). Sometimes it's obvious, but
sometimes it is not. Was hoping there was some utility or something
that would tell what classes weren't found in the style sheets applied.
The reverse would also be nice - a utility that would list classes
in a linked sylesheet that are not actually used by the document in
question.

Is there such a beast?


Reply With Quote
  #7  
Old   
wolfing1@gmail.com
 
Posts: n/a

Default Re: any utility to list undefined CSS classes? - 09-07-2006 , 03:42 PM




David Stone wrote:
Quote:
In article <1157652460.669494.221840 (AT) i3g2000cwc (DOT) googlegroups.com>,
wolfing1 (AT) gmail (DOT) com wrote:

Harlan Messinger wrote:
wolfing1 (AT) gmail (DOT) com wrote:

Art
Hmm... maybe I didn't check the correct option, but I tried it, and one
said the HTML is valid (it syntactically is I guess) and the other said
the CSS is valid (hundreds of warnings about classes not defining
background colors and stuff though)... but none of the options I tried
would tell me that 'yomomma' was not defined for '<div class="yomomma">'

Your question wasn't clear. Classes aren't "defined". You can designate
classes for elements in your HTML document. In CSS, you can associate
styles with none, some, or all of the classes you have used in your HTML
document, as well as with classes that you may not have used at all in a
particular HTML document.

I think what you're asking is whether, *assuming* that the only reason
you're assigning elements to classes is to have styles applied to them,
you want a list of classes that have been assigned but that are not
referenced in any of the selectors in any of the stylesheets linked to
your document. This will reveal any classes that you have either
mistyped or neglected to style. Is that it?
Exactly. Many times I found that I typed something like <div
class="Productheader"> but the class in the css as I wrote it was
.productheader {...} (lowercase P). Sometimes it's obvious, but
sometimes it is not. Was hoping there was some utility or something
that would tell what classes weren't found in the style sheets applied.

The reverse would also be nice - a utility that would list classes
in a linked sylesheet that are not actually used by the document in
question.

Is there such a beast?
Oh yeah! that would be great too! I'm sure there are a bunch of unused
styles in my stylesheets



Reply With Quote
  #8  
Old   
boclair
 
Posts: n/a

Default Re: any utility to list undefined CSS classes? - 09-07-2006 , 06:38 PM



wolfing1 (AT) gmail (DOT) com wrote:
Quote:
David Stone wrote:
In article <1157652460.669494.221840 (AT) i3g2000cwc (DOT) googlegroups.com>,
wolfing1 (AT) gmail (DOT) com wrote:

Harlan Messinger wrote:
wolfing1 (AT) gmail (DOT) com wrote:

Art

Is there such a beast?
Oh yeah! that would be great too! I'm sure there are a bunch of unused
styles in my stylesheets

Have a look at TopStyle that has a Trial Download.
http://www.newsgator.com/NGOLProduct...rodID=TopStyle

Louise


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.