[
https://issues.apache.org/jira/browse/ADFFACES-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470414
]
Jeanne Waldman commented on ADFFACES-370:
-----------------------------------------
I added the 'quick fix' where I render either compressed or uncompressed
styles, but not both the way we do it today. The one exception is if
compression is on, I compress all styles that have a '|' in the name, like
af|inputText, but if it doesn't have '|' in the name, like .AFInstructionText,
I render both compressed and uncompressed versions. The reason is that I want
to be sure I don't break someone that added a styleclass to a skin that they
want someway that they don't expect to be compressed. This is probably not
likely, but it is a safeguard.
> Need to avoid IE's number of CSS selectors limitation
> -----------------------------------------------------
>
> Key: ADFFACES-370
> URL: https://issues.apache.org/jira/browse/ADFFACES-370
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Reporter: Jeanne Waldman
>
> it turns out that IE has a limit to the size of a CSS file. It's not the
> actual size of the file, but rather it is the
> # of CSS selectors. I did a test and found out that the limit is 4095 CSS
> selectors.
> Firefox doesn't appear to have a limit.
> As you may know, the CSS file we generate contains both compressed and
> uncompressed styles, like this:
> .af_inputText_content, .x01 {background-color: blue}
> Our renderers render a shortened styleclass, unless
> the DISABLE_CONTENT_COMPRESSION flag is set to true in web.xml, then it
> renders the long styleclass.
> <input class="x01...>
> Ok, that's the background.
> *The problem* is that because we have a lot of custom components that we've
> built on top of Trinidad, and our customers
> have built custom components, etc, and these all have skinning,
> we have bumped up against the 4095 selector limit in IE. All selectors after
> the 4095th one are ignored.
> *A quick fix*, and probably a good one for a long time, is to render the
> styles in compressed mode when compression is on,
> or in uncompressed mode when compression if off. That will reduce our style
> selectors by 1/2, and will help performance to boot. :)
> I can also add a warning if we go past 4095 selectors for IE.
> Another solution is to break up the file into multiple files when I've
> reached the limit in one file, and include
> all the css files into the rendered page. I can do this in addition to the
> quick fix when I have more time.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.