![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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: |
#3
| |||
| |||
|
|
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 |
#4
| |||
| |||
|
|
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">' |
#5
| |||
| |||
|
|
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 |
#6
| |||
| |||
|
|
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. |
#7
| |||
| |||
|
|
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 |
#8
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |