General Question

ETpro's avatar

Does anyone know of a tool to search the CSS of an entire site and ensure a CSS specifier hasn't been previously used before assigning it?

Asked by ETpro (34594points) July 24th, 2011
3 responses
“Great Question” (0points)

I routinely have to work on sites that use up to four or more CSS style sheets in their cascade. This is because, some are generic, some of the styles are dynamically controlled in the back-end Content Management System in several different ways, and then there is a user defined blank style sheet which can be edited within the CMS and has priority in the cascade, so it can be used to modify any of the generic or dynamically generated CSS. It’s a really cool system in the level of control it gives the user within the CMS, but it can be a challenge to pick a new CSS specifier and be sure it isn’t used anywhere within the cascade.

Does anyone know of a quick method to search the entire cascade for a given CSS specifier? If not, here’s a great programming idea for anyone wishing to write a neat Web developer tool. :-)

Observing members: 0
Composing members: 0

Answers

GladysMensch's avatar

Firebug (for Firefox) will show every style for a specific tag or id, or class… etc.

funkdaddy's avatar

I use Firebug as well.

If it’s something I’m not sure is already in use (like you want to use a classname but you’re not sure if it’s defined elsewhere) I’ll just drop a test element in somewhere obvious, upload the file, and then inspect it with firebug.

It’s a great tool, and makes this as easy as right clicking and then going to “inspect element”, from there you can move through the page structure or view the styles defined for that element directly or through inheritance.

ETpro's avatar

@funkdaddy That’s the key. I use and love firebug, but just hadn’t thought of dropping in a test of the desired classname. Yes, that’s exactly the problem. How to ensure a particular calss specifier hasn’t already been defined differently somewhere else in the cascade.Thanks for the suggestion.

Answer this question

Login

or

Join

to answer.

Mobile | Desktop


Send Feedback   

`