azz0r
azz0r

Reputation: 3311

Grab All CSS Used From A Webpage?

I am making a sub site, I would like a new CSS sheet thats cut down to just what that page needs.

What I would ideally like is a firefox extension that shows the CSS used on a currently viewed page, but not the CSS unused on that page.

Is this possible?

Upvotes: 0

Views: 576

Answers (1)

Sarfraz
Sarfraz

Reputation: 382861

What I would ideally like is a firefox extension that shows the CSS used on a currently viewed page, but not the CSS unused on that page.

To see unused CSS, you can use the Dust Me Selectors addon of firefox.

It extracts all the selectors from all the stylesheets on the page you're viewing, then analyzes that page to see which of those selectors are not used. The data is then stored so that when testing subsequent pages, selectors can be crossed off the list as they're encountered.

You can test pages individually, or spider an entire site, and you'll end up with a profile of which selectors are not used anywhere.

alt text

Upvotes: 1

Related Questions