Way of Determining How Many Style Rules I have


Tags: css,ruby-on-rails,ruby,internet-explorer

Problem :

I'm working on a website. It is quite large, it has over 100 style sheets, and Im (again) starting to lose styles in IE. I've configured rails to compile all of my CSS into one file, and Im only losing styles in IE. IE can only compile 4095 style rules.

Is there a fast and easy way of determining how many style rules a site has? I've looked in various places and I see no such option.

Also, is there a good tool for ruby/rails that minimizes your styles?

Thanks
-Brian



Solution :

Through the command-line: You could pass the html file to grep, and do a word count on the occurences of css.

grep css index.html | wc -l

    CSS Howto..

    How can I change the shape of a gridview to circular?

    How to reject specify HTML tags by using css or xpath selector

    How to vertically align the text into a coloured div using CSS?

    How can I fade in new HTML elements with CSS [duplicate]

    How to enable auto indentation in lists and list items?

    How can I build a dynamic menu using CSS and JavaScript?

    how to position several div tags over each other

    How to calculate padding-top in % of the given div relative to its parent div

    how do I select second submit button to imply other color

    CSS: how to make background on left and right of the content

    How could I add a header to a HTML page via CSS?

    Truncate text in floated box and show it entirely when hovering

    How NOT to combine all CSS into one file with SASS and bootstrap

    How to make a div fill the remaning vertical space using css

    How to Prevent Browsers from Caching CSS Files?

    How To Left Align the Title Using CSS

    how can i update these css classes to generate a blue box behind the first letter of a word?

    How to click on and off submenu's using javascript

    how to change style of element when click on anchor

    how can resize dynamically the logo of the header?

    Newbie CSS/HTML: How to add ad in a div container to the side of the page?

    How to unbind() a hover/ mouseover event?

    How does the following line of JavaScript work?

    What is WebKit and how is it related to CSS?

    How to add fade in and fade out when changing between texts in javascript

    Jquery: How to find if element has inline property (not in CSS)

    How to use HTML and CSS as a Java application GUI?

    How to skew image with CSS?

    Chrome inspector not showing body outline correctly

    SCSS / Sass: How do i change a mixin to output specific CSS?