willinteractive / will-style

WILL styles for webapps.
0 stars 0 forks source link

Work around IE9 4096 per-file Tag Limit #54

Closed dillonlucente closed 9 years ago

dillonlucente commented 9 years ago

You learn something new every day. It turns out real IE9 and below (not emulated) has a per-file limit of 4096 declarations. Everything after that is ignored. Our old styles for the testbed went well beyond this limit and I'm sure that the new apps will as well.

If we want to support IE9 and below for our web apps, we need to figure out a way to serve split css files. I hacked this manually for the Testbed for now, but it's going to be a pain to automate.

We can use these as inspiration:

https://gist.github.com/ChristianPeters/2398394#file_lib_css_splitter.rb

https://github.com/zweilove/css_splitter

chorn99 commented 9 years ago

I think this is where public vs private stylesheets really are important. For internal (WILLie) use, I don’t care to support IE9, but for public we should. Public stylesheets should have minimal styles.​

dillonlucente commented 9 years ago

Yeah, let me put a public stylesheet in this and see how close we get.

http://snippet.bevey.com/css/selectorCount.php

dillonlucente commented 9 years ago

We'll still need to trim down the public sheets, Access public.css has 4657 selectors.

chorn99 commented 9 years ago

Ugh, yeah I guess this is where using a framework can bite you in the a**​

dillonlucente commented 9 years ago

This should work:

https://github.com/zweilove/css_splitter

dillonlucente commented 9 years ago

Instructions are up. Looks pretty simple.