what is the max number css rules I can specify in style sheet per browser.
views:
51answers:
2Are you talking about how many css includes you can do? IE does have a maximum of 32 (source) or maybe 31.
However it sounds like you are asking if there is a maximum amount of styles you can include in a single .css file, and I am not aware of any limit in that respect.
There's no official limit for any browser, but Internet Explorer has a couple of "unofficial" limits:
- Maximum number of external stylesheets per page is 32,
- Maximum number of rules per stylesheet is reportedly 4096.
I'm not aware of any limits in other browsers, but in theory a very large file could cause issues in any of them.
Various sources:
http://simple.procoding.net/2009/02/20/internet-explorer-limits-number-of-external-css-files-to-32/
http://joshua.perina.com/africa/gambia/fajara/post/internet-explorer-css-file-size-limit
http://am-blog.no-ip.org/BlogEngine/post/2010/03/24/CSS-File-Size-Limit-in-Internet-Explorer-6-7-8.aspx