Description
-----------
http://www.dojotoolkit.org already uses the Closure-Compiler as a JS
minification tool and explores moving to Closure-Stylesheets for CSS
compression. However, the tool seems not to be usable for this at the moment:
Compressing dijit.css, a CSS file shipped with Dojo (see file attached)
triggers numerous errors, and specifing "--allow-unrecognized-functions
--allow-unrecognized-properties" does not turn off linting. The parser still
fails due to IE specific hacks like "#zoom" (know as star hack, see
http://en.wikipedia.org/wiki/CSS_filter#Star_hack) or IE specific stuff like
"top: expression(eval((document.documentElement||document.body).scrollTop));".
What steps will reproduce the problem?
--------------------------------------
Try to compress the attached CSS file with "java -jar closure-stylesheets.jar
--allow-unrecognized-functions --allow-unrecognized-properties dijit.css".
This fails with several errors. Replacing "#zoom" with "*zoom" gets rid off the
error. But there a still problems with stuff like "expression(....)".
Specifying "--allowed-non-standard-function expression" seems to have no
effect. The parser still fails.
What is the expected output? What do you see instead?
-----------------------------------------------------
For simple CSS compression, there should be an option to turn off linting
completely? When using CSS variables and mixings, the parser should not fails
either if the CSS contains cases as mentioned above.
What version of the product are you using? On what operating system?
--------------------------------------------------------------------
closure-stylesheets-20111230.jar on Win7Home
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
Please provide any additional information below
------------------------------------------------
Would be cool if Closure-Stylesheets could work with the attached CSS file.
Compressing dijit.css with the YUI-Compressor works like a charm. It would be
great if Closure-Stylesheets could achieve the same compression ratio like the
YUI-Compressor. Then it would be a great alternative and worth a thought adding
it to the Dojo release like Closure-Compiler and thereby replacing LESS and
providing higher CSS compression rates (However this needs further discussions
with the Dojo core team, and I am not a member of the core team).
Original issue reported on code.google.com by oliver.s...@googlemail.com on 24 Jun 2012 at 12:27
Original issue reported on code.google.com by
oliver.s...@googlemail.com
on 24 Jun 2012 at 12:27Attachments: