问题
Possible Duplicate:
is there any limit on css file size?
I have a generated CSS file coming from a third party application of around 60K lines with ~ 13K classes defined in that. I cannot change the generated CSS file by any means on the server (when it is generated from the third-party application) and the way it is injected in different HTML files on GET requests.
My target browser for the application is IE9 and it so happens that IE9 is failing to parse more than 4095 classes coming from one file and hence doesn't get the classes defined after that. Also, this number has been exact while debugging the generated file I have and another test file which I created (gist below) to verify this number.
Is there any workaround possible or am I missing any detail here ?
Illustration:
To give a quick way to reproduce this problem, here is a link to a gist that I have created. Just extract all the files in some folder and open ie9_test.html
in IE9
https://gist.github.com/3941331
I couldn't find any service to show the output online where an IE9 environment is present. My IE9 build is 9.0.8112.16421
EDIT: The test files and my files work fine on chrome v22
回答1:
Well one obvious workaround would be to break it up yourself into two or more files. You could then include both on the relvant pages. You would just have to write a simple css parser to identify where to cut up the file. And by simple I mean just find where classes start and begin so you know where to chop chop.
来源:https://stackoverflow.com/questions/13039108/ie9-fails-to-parse-css-file-having-more-than-4100-classes