Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the max number css rules I can specify in style sheet per browser

Tags:

css

what is the max number css rules I can specify in style sheet per browser.

like image 794
An Object Avatar asked Aug 04 '10 14:08

An Object


1 Answers

Internet Explorer 6-9 have a few reported limits:

  • Any rules after the first 4,095 are ignored
  • Any stylesheets included via @import, <link> or <style>, are ignored after the first 31
  • @import statements nested 4 or more levels deep are ignored

These limits are outlined in KB 262161. In IE10 these limits were significantly raised to:

  • A stylesheet may contain up to 65,534 rules
  • A document may use up to 4,095 stylesheets
  • @import nesting no longer has its own limit

There are no such reported limits for other browsers, but in theory any of them could run into performance issues with a large number of unoptimised CSS rules.

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

like image 109
Andy E Avatar answered Nov 15 '22 22:11

Andy E