Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
http://drupal.org/project/css_custom_aggregate
Issue affects IE9 and lower
http://blogs.msdn.com/b/ieinternals/archive/2011/05/14/10164546.aspx
Will need to test media queries as well; use this as a baseline css file.
http://marc.baffl.co.uk/browser_bugs/css-selector-limit/
Comment | File | Size | Author |
---|---|---|---|
#18 | limit_css_selector-1983728-17.patch | 8.66 KB | malcomio |
#17 | interdiff-1983728-13-17.txt | 5.66 KB | malcomio |
#15 | limit_css_selector-1983728-15.patch | 14.91 KB | malcomio |
#13 | advagg-1983728-13-split-css-d6.patch | 7.46 KB | eduardo.flores |
#10 | advagg-1983728-10-split-css.patch | 12.27 KB | mikeytown2 |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedLooks like media queries do not change the css selector count.
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedThe following patch has been committed.
Comment #4
mikeytown2 CreditAttribution: mikeytown2 commentedComment #5
branana CreditAttribution: branana commentedI have create a patch that allows advagg to part out a single source CSS file over 4095 rules long into multiple parts first, then include them individually as style tags after aggregation.
This patch does assume that there are no media query blocks spanning the rules where it needs to split up the files at. (AKA: around every 4000th rule or about there).
Comment #6
mikeytown2 CreditAttribution: mikeytown2 commentedI have a function advagg_parse_media_blocks() that I use for breaking up a CSS file into media query sections. Example usage can be found in this bug that I just fixed #2124391: Off by one error with advagg_parse_media_blocks (was actually working on an example on how to use it for here when I discovered the bug). If you could incorporate the usage of advagg_parse_media_blocks() into your patch so that it will correctly handle large media query blocks that would be helpful :)
Comment #6.0
mikeytown2 CreditAttribution: mikeytown2 commentedUpdated issue summary.
Comment #7
branana CreditAttribution: branana commentedOK I will see if I can implement advagg_parse_media_blocks() in the split line finding part
Comment #8
mikeytown2 CreditAttribution: mikeytown2 commented@branana
Any progress?
:)
Comment #9
mikeytown2 CreditAttribution: mikeytown2 commentedGoing to work on this
Comment #10
mikeytown2 CreditAttribution: mikeytown2 commentedThis patch has been committed.
Comment #12
eduardo.flores CreditAttribution: eduardo.flores commentedComment #13
eduardo.flores CreditAttribution: eduardo.flores commentedI worked on this patch for Drupal 6 where it will divide the css file groups in subgroups if it exceeds the selector limit.
Comment #14
malcomio CreditAttribution: malcomio commentedThe patch in #13 seems to work as expected from an initial test - will test some more before marking as RTBC though. Also there are a couple of typos and coding standards issues in the patch - will add a new patch later.
Comment #15
malcomio CreditAttribution: malcomio commentedAfter applying the patch in #13 and enabling advagg_bundler, the advagg_bundler_selector_count table isn't actually created, because there isn't a hook_install calling drupal_install_schema()
Here's a new patch
Comment #16
joelpittet@malcomio could you post an interdiff so we can see what you changed? @see https://drupal.org/documentation/git/interdiff
This type of indentation is not in our coding standards. https://drupal.org/coding-standards
Also changing the indentation makes it hard to see what part of the code is actually fixing the bug/feature in the issue so please avoid going all out and move the cleanup coding standards stuff to it's own issue(usually).
Comment #17
malcomio CreditAttribution: malcomio commentedGood point - here's a new patch without the coding standards changes, and an interdiff.
Comment #18
malcomio CreditAttribution: malcomio commentedComment #19
mikeytown2 CreditAttribution: mikeytown2 commentedJust a heads up that the 7.x version of this has a couple of bugs that I will be working on
#2405531: IE CSS Selectors limiter cause memory and I/O issues
#2412093: IE CSS Selectors limiter doesn't work with less module
Comment #21
mikeytown2 CreditAttribution: mikeytown2 commentedThanks for the patch. Looking over it and the 7.x issue had to do with stream wrappers.