Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8388549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:29:41+00:00 2026-06-09T18:29:41+00:00

Probably any experienced web developer would be familiar with this problem: over time your

  • 0

Probably any experienced web developer would be familiar with this problem: over time your css files can grow pretty huge and ugly because of all the no longer used selectors, which might be pretty tricky to find. I’m working on a rails project where we tend to re-design things quite frequently, which leads to a tonne of deadweight css. What’s the best way to find and remove it?

Now, I do know that there is a rails plugin called deadweight built specifically for that purpose. However, here’s my problem with deadweight: first of all, it completely ignores selectors used in javascript. Next, it scans only those pages that you configure it to scan which means there’s a risk of removing something that is used on pages that you didn’t scan for some reason. Finally, it finds unused selectors only in compiled css (we use LESS) – matching these against the actual code is a bit too involved.

I have also tried http://unused-css.com/ – they’re great, but can’t access localhost and, again, can only scan compiled CSS.

I really think there must be a better way of doing this. Actually, some time ago I decided to optimise one particular css file by grepping each selector in the entire project directory (emacs + rinari mode make it super-easy and super-fast), and each time I didn’t see any html or css in the results I removed the style. Zero problems, worked like a charm. Obviously, I’m not going to do that for the entire site. However, I really don’t believe that this couldn’t be automated. Now, before I fire up my python and code this up, can anyone actually tell me if I’d be reinventing the wheel?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T18:29:42+00:00Added an answer on June 9, 2026 at 6:29 pm

    Check out uCSS library from Opera Software.

    It helps you to find unused CSS, as well as duplicate CSS. Also, you can get an overview of how many times each rule has been used in your markup. Several options are available by setting up a config file.

    Update:

    Another great alternative: csscss.

    Written in Ruby and supports SASS, Less.

    Update:

    Another great alternative: uncss.

    It works across multiple files and supports Javascript-injected CSS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is probably an easy question for anyone with any moderate expertise with web
This is probably batch scripting 101, but I can't find any clear explanation/documentation on
This is probably just wishful thinking... Is there any way to check to see
This is probably something really simple but I cant see what! Any images I
Morning y'all This is probably an easy one but I barely got any sleep
Probably a very trivial problem. I have an object that looks like this: @PersistenceCapable
I know it probably sounds like very trivial question but I couldn't find any
So I have a container(any kind, probably std::map or std::vector) which contains objects of
I am a fairly experienced (mid-level) developer that has spent quite a bit of
I think I would like to see/make a very simple web based program using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.