Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Splitting Combined CSS to avoid IE 4096 selector limit #162

Open
voycey opened this issue Jun 3, 2013 · 3 comments
Open

Splitting Combined CSS to avoid IE 4096 selector limit #162

voycey opened this issue Jun 3, 2013 · 3 comments

Comments

@voycey
Copy link

voycey commented Jun 3, 2013

IE to version 9 has a silly 4096 selector limit issue where it silently fails, we are using LESS on our latest site and AssetCompress to combine and minify them - the site isnt that big and is due to grow quickly and we are already up at around 3500 selectors on some pages - would it be possible to build in an option to split the combined sheet before it reaches this amount?

@markstory
Copy link
Owner

Maybe but you'd need to solve a few problems:

  • What would the file be named.
  • How would the split file be incorporated into the pages it is needed?

I usually try and solve this by manually ensuring files don't get that big.

@voycey
Copy link
Author

voycey commented Jun 4, 2013

Maybe a simple _1 _2?

I am currently splitting them manually in the assetcompress ini file, and ensuring some CSS is only called on the pages it is needed but I do think we will hit this limit eventually on a couple of pages - LESS is a monster when it comes to CSS selectors.

@markstory
Copy link
Owner

I think LESS only has these kinds of problem if you abuse nesting 😉

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants