Jeff-Lewis / minify

Automatically exported from code.google.com/p/minify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Option to move CSS @imports to top of combined file #89

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Paul Craciunoiu noticed that when CSS files are combined, @imports can end 
up in the middle of the output, invalidating the stylesheet.

Attached is his patch to bubble @import declarations to the top of the 
output. 

For now I think the best option is to make this behavior optional 
(disabled by default) because it can alter the cascade in a stylesheet, 
introducing specificity bugs that are hard to diagnose.

To Do:
1. Integrate the patch as a serve() option "bubbleCssImports" by default 
false.
2. In _getCacheId(), add "bubbleCssImports" to the digest input
3. In _combineMinify() if the option is false, check CSS output for 
"@import" after "{" (temp remove comments) and prepend warning comment if 
detected.
4. Add documentation of issue

Original issue reported on code.google.com by mrclay....@gmail.com on 26 Feb 2009 at 3:04

Attachments:

GoogleCodeExporter commented 9 years ago
R291 added option.
To Do:
1. Unit test in test_Minify
2. Add option to /min/config.php

Original comment by mrclay....@gmail.com on 26 Feb 2009 at 5:07

GoogleCodeExporter commented 9 years ago
Completed in R292.

Original comment by mrclay....@gmail.com on 1 Mar 2009 at 9:35