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.
<link type="text/css" rel="stylesheet" href="http://lvlt.sandbox/sites/default/files/advagg_css/css__mjG2sC3H02i_0vDh2K_F9gTSZl1KHZ2BB1ILA8EEUeE__n0CNmW0d9LEuW5F0luNG1e54QYN68j_Yczbjyd3RaRo__nC0jJI-2xohKzCvFq1Fm37Wp9xFK5_7J6TtgqlszDBA.css" media="all" />
<link type="text/css" rel="stylesheet" href="http://lvlt.sandbox/sites/default/files/advagg_css/css__Lck2ZjlT2A2dmxDkcefVscUqYRTpw4VY4JEitCzxpIs__TVfFy8QIZmzmt1mgoF8pPuJ9CN_gb-ZCO7n8hEZTnuU__nC0jJI-2xohKzCvFq1Fm37Wp9xFK5_7J6TtgqlszDBA.css" media="screen" />
<link type="text/css" rel="stylesheet" href="http://lvlt.sandbox/sites/default/files/advagg_css/css__l5FfWsoIGBGx3dudymVqFoz5pfNc6BsIKOIWfkwj_gQ__YWLMIbIEiRt001hTp6V1jZlySlzyxQ3VONpxXHKaBSs__nC0jJI-2xohKzCvFq1Fm37Wp9xFK5_7J6TtgqlszDBA.css" media="all" />
At first, I thought it was because of the different media types, however you can see here there's two of the all
media types.
Comment | File | Size | Author |
---|---|---|---|
#22 | advagg-1943404-22-flaten-css-media.patch | 5.46 KB | mikeytown2 |
#18 | advagg-1943404-18-fix-ie9.patch | 2.14 KB | mikeytown2 |
#13 | advagg-1943404-13-fix-php-errors.patch | 721 bytes | mikeytown2 |
#12 | advagg-1943404-12-fix-mixed-media.patch | 1.3 KB | mikeytown2 |
#10 | advagg-1943404-10-big-css.patch | 13.71 KB | mikeytown2 |
Comments
Comment #1
markhalliwellWhen AdvAgg is disabled:
So yes, there's one module that's adding a
screen
media type to it's CSS. Everything else is all.Perhaps we can do something like this in one aggregated file:
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedThis is a feature request as it is already combining the CSS as small as it can while maintaining the order... will tryout the media query trick.
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedMake this happen
http://davidwalsh.name/css-media
Comment #4
mikeytown2 CreditAttribution: mikeytown2 commentedLooking at the best way to make this happen and I think I'll add a data column to the advagg_aggregates table. For CSS files, it will store the media type. Not sure how it could be used for other purposes but for now this is the direction I'll go. I just hope the refactor to make this work is worth the effort.
advagg.missing.inc -> advagg_get_files_from_hashes() and everything down stream will need work so advagg_get_css_aggregate_contents() can do its magic.
advagg.inc -> advagg_insert_aggregate() and everything up stream will need work in order to save the media type in the database.
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedOne thing that is a little tricky with this is @import statements. http://www.w3.org/TR/css3-mediaqueries/#media0 Example of this syntax in action: http://philarcher.org/diary/2011/importrules/
Comment #6
mikeytown2 CreditAttribution: mikeytown2 commentedStill need to add a setting and write the code to turn this functionally on; functionally is there though.
Comment #7
mikeytown2 CreditAttribution: mikeytown2 commentedWhy this needs to be an option: http://www.broken-links.com/2007/02/15/ie7-and-import-media-types/
Still no luck for work around: http://code.google.com/p/css3-mediaqueries-js/ https://github.com/scottjehl/Respond
Comment #8
mikeytown2 CreditAttribution: mikeytown2 commentedalso need to fix bundler sub module
Comment #9
mikeytown2 CreditAttribution: mikeytown2 commentedStill need to add in the admin checkbox. Functionally has been turned on though and it appears to be working with this patch
Comment #10
mikeytown2 CreditAttribution: mikeytown2 commentedThis patch has been committed.
Comment #11
mikeytown2 CreditAttribution: mikeytown2 commentedFound a bug. Working on the fix
Comment #12
mikeytown2 CreditAttribution: mikeytown2 commentedThis patch has been committed
Comment #13
mikeytown2 CreditAttribution: mikeytown2 commentedFixed another bug with this change. This patch has been committed.
Comment #15
Plazik CreditAttribution: Plazik commentedI'm using 7.x-2.0-alpha1 version of module and AdaptiveTheme 7.x-3.1.
If "Combine css files by using media queries " is checked media queries don't work in IE9 (IE8, Firefox, Chrome, Opera - works fine).
Comment #16
mikeytown2 CreditAttribution: mikeytown2 commentedRelevant?
http://stackoverflow.com/questions/6917639/css-media-query-not-working-i...
Comment #17
mikeytown2 CreditAttribution: mikeytown2 commentedhttp://stackoverflow.com/questions/6881958/how-to-disable-compatibility-...
http://api.drupal.org/comment/18004#comment-18004
Comment #18
mikeytown2 CreditAttribution: mikeytown2 commentedThe following patch has been committed
Comment #19
Plazik CreditAttribution: Plazik commentedThanks, bit it stil doesn't work.
I thinks it doesn't because of
"IE=edge,chrome=1"
.If "Combine css files by using media queries" is checked the css file will be like this:
I think IE9 doesn't like this construction
@media only screen {@media only screen and (min-width:321px) and (max-width:480px) {...}}
.If I manual change css file to:
it works correct in IE9.
Comment #20
mikeytown2 CreditAttribution: mikeytown2 commentedWorks in firefox (my main browser) and thus I didn't catch this bug http://stackoverflow.com/questions/11746581/nesting-media-rules-in-css/1...
Luckily I did some similar work with media queries in the css_emimage module #1293616: Breaks images when @media declarations are used so not all hope is lost :) This isn't going to be as easy as I've hoped though.
Comment #21
mikeytown2 CreditAttribution: mikeytown2 commentedLooks like the needed change is inside of advagg_get_css_aggregate_contents()
Comment #22
mikeytown2 CreditAttribution: mikeytown2 commentedThis patch has been committed. Let me know if any other bugs show up due to this :)