Closed (fixed)
Project:
Advanced CSS/JS Aggregation
Version:
7.x-2.x-dev
Component:
Bundler
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Mar 2013 at 21:43 UTC
Updated:
14 May 2013 at 23:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
markhalliwellWhen AdvAgg is disabled:
So yes, there's one module that's adding a
screenmedia type to it's CSS. Everything else is all.Perhaps we can do something like this in one aggregated file:
Comment #2
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 commentedMake this happen
http://davidwalsh.name/css-media
Comment #4
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 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 commentedStill need to add a setting and write the code to turn this functionally on; functionally is there though.
Comment #7
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 commentedalso need to fix bundler sub module
Comment #9
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 commentedThis patch has been committed.
Comment #11
mikeytown2 commentedFound a bug. Working on the fix
Comment #12
mikeytown2 commentedThis patch has been committed
Comment #13
mikeytown2 commentedFixed another bug with this change. This patch has been committed.
Comment #15
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 commentedRelevant?
http://stackoverflow.com/questions/6917639/css-media-query-not-working-i...
Comment #17
mikeytown2 commentedhttp://stackoverflow.com/questions/6881958/how-to-disable-compatibility-...
http://api.drupal.org/comment/18004#comment-18004
Comment #18
mikeytown2 commentedThe following patch has been committed
Comment #19
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 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 commentedLooks like the needed change is inside of advagg_get_css_aggregate_contents()
Comment #22
mikeytown2 commentedThis patch has been committed. Let me know if any other bugs show up due to this :)