dj-corps / closure-stylesheets Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/closure-stylesheets
License: Apache License 2.0
Automatically exported from code.google.com/p/closure-stylesheets
License: Apache License 2.0
Added new properties.
Original issue reported on code.google.com by [email protected]
on 4 Sep 2013 at 12:28
Attachments:
I am using css with Qt, I have a css as follow:
QSlider::sub-page:horizontal
{
background: qlineargradient(x1:1, y1:0, x2:0, y2:0, stop: 0 COLOR8, stop: 1 COLOR6);
margin-top: 5px;
margin-bottom: 5px;
}
COLOR8 and COLOR6 are defined already.
The parser has errors as follow:
Compiler parsing error: Parse error in ShivaQt.gss at line 150 column 35:
background: qlineargradient(x1:1, y1:0, x2:0, y2:0, stop: 0 COLOR8, stop: 1 COLOR6);
^
com.google.common.css.compiler.ast.GssParserException: Parse error in
ShivaQt.gss at line 150 column 35:
background: qlineargradient(x1:1, y1:0, x2:0, y2:0, stop: 0 COLOR8, stop: 1 COLOR6);
I used option " --allow-unrecognized-functions" but not works. I only want the
closure-stylesheets pars "COLOR8" and "COLOR6" for me, the version I use is
closure-stylesheets-20111230.jar.
Is there any other way I can avoid this issue or it is a limitation currently
for such function "qlineargradient" from Qt?
Original issue reported on code.google.com by [email protected]
on 5 Apr 2012 at 8:02
What steps will reproduce the problem?
1. create the following css style
.cssButton {background-color: #00853f; background: linear-gradient(0deg,
#00853f, #7BAE3B ); }
2. Run the google closure compiler (version 20111230.jar) against this style
3. The background-color style is ignored without warning and excluded from the
compiled-output-file
4. If you place the background-color AFTER the background: linear-gradient(...)
style... then the compiler at least puts both styles into the compiled output
What is the expected output? What do you see instead?
expected output is a possible warning or error indicating that the
background-color attribute will be ignored or excluded from the output-file
What version of the product are you using? On what operating system?
(version 20111230.jar) running on SunOS 5.10 with jre1.6.0_33
Please provide any additional information below.
it's possible that the compiler is correct in excluding the background-color in
favor of the abbreviated syntax "background:...." style but there should be a
warning or error thrown.
Original issue reported on code.google.com by [email protected]
on 21 Jun 2013 at 6:00
What steps will reproduce the problem?
1. Clone closure stylesheets project
2. Run ant
What is the expected output? What do you see instead?
It should compile and generate the binary
What version of the product are you using? On what operating system?
I'm using it on osX 10.9, Java 1.6.0_65, ant version 1.9.3
Original issue reported on code.google.com by [email protected]
on 1 Apr 2014 at 4:52
Attachments:
What steps will reproduce the problem?
1. Set a box-shadow with multiple shadows, using @def or @defmixin parameters.
2. All but the last shadow set will quote the names literally in the compiled
output.
What is the expected output? What do you see instead?
All the colour constants should be evaluated, eg:
@def FG_LIGHT rgb(255,255,255);
@def FG_MID rgb(128,128,128);
@def FG_DARK rgb(71,71,71);
@defmixin boxshadow(COL1,COL2,COL3) {
box-shadow: inset 0px 0px 0px 1px COL1, inset 0px 2px 1px 0px COL2, inset 0px
0px 0px 2px COL3;
}
@mixin boxshadow(FG_DARK,FG_LIGHT,FG_MID);
or
box-shadow: inset 0px 0px 0px 1px FG_DARK, inset 0px 2px 1px 0px FG_LIGHT,
inset 0px 0px 0px 2px FG_MID;
Both should produce:
box-shadow: inset 0px 0px 0px 1px rgb(71,71,71), inset 0px 2px 1px 0px
rgb(255,255,255), inset 0px 0px 0px 2px rgb(128,128,128);
however, both actually produce, respectively:
box-shadow: inset 0px 0px 0px 1px COL1, inset 0px 2px 1px 0px COL2, inset 0px
0px 0px 2px rgb(128,128,128);
and
box-shadow: inset 0px 0px 0px 1px FG_DARK, inset 0px 2px 1px 0px FG_LIGHT,
inset 0px 0px 0px 2px rgb(128,128,128);
What version of the product are you using? On what operating system?
Latest compiler (packaged 12/12/12), Windows 7 x64 with Java 7
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 18 Jan 2013 at 10:12
What steps will reproduce the problem?
1. Use the following simple CSS:
*,body,.inner-playable-list-item {
-webkit-user-select: none;
/* @alternate */
-khtml-user-select: none;
/* @alternate */
-moz-user-select: none;
/* @alternate */
-ms-user-select: none;
/* @alternate */
user-select: none;
-webkit-touch-callout: none;
}
2. Use the jar with following options:
--allowed-unrecognized-property user-select
--output-renaming-map-format CLOSURE_COMPILED
--rename CLOSURE
What is the expected output? What do you see instead?
Valid minified CSS file
Instead the following is produced:
*,body,.a-b-c-d{-webkit-user-select:none;-khtml-user-select:none;-moz-user-selec
t:none;-ms-user-select:none;user-select:none;-webkit-touch-callout:none}
Notice the missing semicolon after the last property value. (none} instead of
none;}).
What version of the product are you using? On what operating system?
The jar does not seem to have -version command.
Please provide any additional information below.
The jar was built from the source because several important properties in css
are added after the last official release.
Original issue reported on code.google.com by [email protected]
on 31 Oct 2013 at 10:08
What steps will reproduce the problem?
1. create a one-line css file "bug.css", containing only the following line:
LI.trail:before { content: "> "; }
2. run losure-stylesheets as follows:
java -jar closure-stylesheets.jar bug.css
3. get the following output:
LI.trail:before{content:"\00003e "}
There are several issues with the output:
- The space after "\00003e" needs to be doubled. See section 4.1.4
of http://www.w3.org/TR/CSS21/syndata.html for reference:
Only one white space character is ignored after a hexadecimal
escape. Note that this means that a "real" space after the escape
sequence must be doubled.
This problem causes html pages using the minified style sheet
to render differently from pages which use the original style sheet.
- The trailing zeros in "\00003e" seem unnecessary. Four characters
could be saved by writing "\3e" instead.
- Does the ">" need escaping at all?
The problem is present in current git (commit id
86bb800d79a32bfc0328bbf74bfeb772c6eb73b0)
I hope this helps,
Jochen
Original issue reported on code.google.com by [email protected]
on 22 Mar 2013 at 3:17
What steps will reproduce the problem?
1. whenever css media type is used, parser is throwing GssParserException
2. Reference http://www.w3schools.com/css/css_mediatypes.asp
3. Input
---
@media print{ html { background:#fff; } }
---
What is the expected output?
@media print{html{background:#fff;}}
What version of the product are you using? On what operating system?
closure-stylesheets-20111215.jar, Windows XP Professional
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 23 Dec 2011 at 8:38
It is not possible to specify the OptimizeStrategy in JobDescriptionBuilder
because there is no setter for it.
Working with current HEAD (1 Dec 2011).
Original issue reported on code.google.com by [email protected]
on 1 Dec 2011 at 2:45
What steps will reproduce the problem?
1. Use text-justify CSS3 property.
What is the expected output? What do you see instead?
The compiler doesn't support the text-justify property:
text-justify is an unrecognized property in main.gss at line 387 column 3:
text-justify: auto;
^
1 error(s)
What version of the product are you using? On what operating system?
closure-stylesheets-20111230.jar
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 18 Mar 2012 at 2:14
CSS syntax for @keyframes, @-ms-keyframes and @-o-keyframes is not supported.
What steps will reproduce the problem?
1. java -jar closure-stylesheets-20111230.jar test.css
--allow-unrecognized-properties --allow-unrecognized-functions
2. An error is given for 0% syntax, which is correct.
What is the expected output? What do you see instead?
Minified css expected, instead - parser error.
What version of the product are you using? On what operating system?
20111230, Windows 7
Original issue reported on code.google.com by [email protected]
on 7 Aug 2012 at 7:23
Attachments:
this is a feature
for example
@defmixin border-radius(RADIUS) {
@mixin border-radius-corners(RADIUS, RADIUS, RADIUS, RADIUS)
}
@defmixin border-radius-corners(LT, RT, LB, RB) {
-webkit-border-radius: LT RT LB RB;
-moz-border-radius: LT RT LB RB;
border-radius: LT RT LB RB;
}
Original issue reported on code.google.com by [email protected]
on 4 May 2012 at 7:18
What steps will reproduce the problem?
1. Try to compile a file with windows UFT8 + BOM encoding and crash
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
20111230
Please provide any additional information below.
Try to compiled attached (UTF8 + BOM) and you will see it reproduced.
Original issue reported on code.google.com by [email protected]
on 9 Mar 2012 at 7:32
Attachments:
Source files:
--- menu.gss ---
li.social {
@mixin debug_italics();
padding-left: 15px;
}
--- 00-debug.gss ---
@if (DEBUG) {
@defmixin debug_italics() {
font-style: italics;
}
} @else {
@defmixin debug_italics() {
/* Nothing. */
}
}
-- OR --
li.social {
@if (DEBUG) {
font-style: italic;
}
padding-left: 15px;
}
-------------------------------
Neither work, the first example results in:
Compiler internal error: com.google.common.css.compiler.ast.CssMixinNode cannot
be cast to com.google.common.css.compiler.ast.CssDeclarationNode
java.lang.ClassCastException: com.google.common.css.compiler.ast.CssMixinNode
cannot be cast to com.google.common.css.compiler.ast.CssDeclarationNode
at com.google.common.css.compiler.passes.DisallowDuplicateDeclarations.enterRuleset(DisallowDuplicateDeclarations.java:64)
at com.google.common.css.compiler.ast.DefaultVisitController$VisitRulesetState.doVisit(DefaultVisitController.java:762)
at com.google.common.css.compiler.ast.DefaultVisitController.startVisit(DefaultVisitController.java:1762)
at com.google.common.css.compiler.passes.DisallowDuplicateDeclarations.runPass(DisallowDuplicateDeclarations.java:75)
at com.google.common.css.compiler.passes.PassRunner.runPasses(PassRunner.java:142)
at com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.parseAndPrint(DefaultCommandLineCompiler.java:106)
at com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.compile(DefaultCommandLineCompiler.java:94)
at com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.execute(DefaultCommandLineCompiler.java:129)
at com.google.common.css.compiler.commandline.ClosureCommandLineCompiler.executeJob(ClosureCommandLineCompiler.java:286)
at com.google.common.css.compiler.commandline.ClosureCommandLineCompiler.main(ClosureCommandLineCompiler.java:359)
--------------------
The second results in:
Compiler internal error:
com.google.common.css.compiler.ast.CssUnknownAtRuleNode cannot be cast to
com.google.common.css.compiler.ast.CssDeclarationNode
java.lang.ClassCastException:
com.google.common.css.compiler.ast.CssUnknownAtRuleNode cannot be cast to
com.google.common.css.compiler.ast.CssDeclarationNode
at com.google.common.css.compiler.passes.DisallowDuplicateDeclarations.enterRuleset(DisallowDuplicateDeclarations.java:64)
at com.google.common.css.compiler.ast.DefaultVisitController$VisitRulesetState.doVisit(DefaultVisitController.java:762)
at com.google.common.css.compiler.ast.DefaultVisitController.startVisit(DefaultVisitController.java:1762)
at com.google.common.css.compiler.passes.DisallowDuplicateDeclarations.runPass(DisallowDuplicateDeclarations.java:75)
at com.google.common.css.compiler.passes.PassRunner.runPasses(PassRunner.java:142)
at com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.parseAndPrint(DefaultCommandLineCompiler.java:106)
at com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.compile(DefaultCommandLineCompiler.java:94)
at com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.execute(DefaultCommandLineCompiler.java:129)
at com.google.common.css.compiler.commandline.ClosureCommandLineCompiler.executeJob(ClosureCommandLineCompiler.java:286)
at com.google.common.css.compiler.commandline.ClosureCommandLineCompiler.main(ClosureCommandLineCompiler.java:359)
------------------
I've tried this with the tip-of-the-tree version, the latest downloadable
version, and the version before that, all with the same errors. What do?
Original issue reported on code.google.com by [email protected]
on 22 Jul 2012 at 10:23
Add customer ant task for building css from one or more gss source file.
similar solution exists for javascript closure.
http://code.google.com/p/closure-compiler/wiki/BuildingWithAnt
Original issue reported on code.google.com by [email protected]
on 22 Nov 2011 at 2:48
What steps will reproduce the problem?
1. Define a variable e.g: @def width 10
2. Use this variable in style as .style1 { width: width; }
3. width is not replaced with the value 10.
What is the expected output? What do you see instead?
Expected output is width to be assigned value 10 which instead is being set as
width.
What version of the product are you using? On what operating system?
closure-stylesheet version: using jar closure-stylesheets-20111230.jar
OS: windows7
Please provide any additional information below.
It is no where documented that variable name must be in upper case. It is
documented only for mixins. In code, the condition isDefinitionReference of
CssConstantReferenceNode class is used both for mixins and variable
verification and only throws error for mixins and not variables. Hence, the
pareser silently moves forward without replacing the lower case variable values
and we get the issues at later stages.
Original issue reported on code.google.com by [email protected]
on 7 Aug 2012 at 10:44
What steps will reproduce the problem?
1. Setup a very simple CSS file with UTF-16 encoding (see attached file)
2. java -jar closure-stylesheets-20111230.jar "utf16-test.css"
What is the expected output? What do you see instead?
I expected it to parse the file without error. Instead, I get:
Compiler parsing error: Parse error in utf16-test.css at line 5 column 5:
html
^
com.google.common.css.compiler.ast.GssParserException: Parse error in
utf16-test.css at line 5 column 5:
html
^
at com.google.common.css.compiler.ast.GssParserCC.parse(GssParserCC.java:163)
at com.google.common.css.compiler.ast.GssParser.parse(GssParser.java:46)
at com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.parseAndPrint(DefaultCommandLineCompiler.java:104)
at com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.compile(DefaultCommandLineCompiler.java:94)
at com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.execute(DefaultCommandLineCompiler.java:129)
at com.google.common.css.compiler.commandline.ClosureCommandLineCompiler.executeJob(ClosureCommandLineCompiler.java:293)
at com.google.common.css.compiler.commandline.ClosureCommandLineCompiler.main(ClosureCommandLineCompiler.java:366)
Caused by: com.google.common.css.compiler.ast.ParseException: Encountered "
<IDENTIFIER> "html "" at line 5, column 5.
Was expecting one of:
":" ...
"." ...
"[" ...
"{" ...
"," ...
<S> ...
<HASH_NAME> ...
<S> ...
at com.google.common.css.compiler.ast.GssParserCC.generateParseException(GssParserCC.java:3686)
at com.google.common.css.compiler.ast.GssParserCC.jj_consume_token(GssParserCC.java:3565)
at com.google.common.css.compiler.ast.GssParserCC.ruleSet(GssParserCC.java:431)
at com.google.common.css.compiler.ast.GssParserCC.block(GssParserCC.java:2804)
at com.google.common.css.compiler.ast.GssParserCC.start(GssParserCC.java:2851)
at com.google.common.css.compiler.ast.GssParserCC.parse(GssParserCC.java:161)
... 6 more
What version of the product are you using? On what operating system?
closure-stylesheets-20111230.jar on Windows 7
Please provide any additional information below.
If I convert the same exact file to UTF8 or ASCII without the BOM, it processes
fine.
Original issue reported on code.google.com by [email protected]
on 10 Jul 2014 at 3:19
Attachments:
What steps will reproduce the problem?
1. Try to use CSS Source Maps
2. Open Developer Tools
3.
What is the expected output? What do you see instead?
CSS source maps while debugging CSS
What version of the product are you using? On what operating system?
Latest Chrome, Windows
Please provide any additional information below.
https://developers.google.com/chrome-developer-tools/docs/css-preprocessors
Add generating CSS Source Maps to closure stylesheets
Original issue reported on code.google.com by jhiswin
on 9 Dec 2013 at 10:21
a {
-webkit-filter: drop-shadow(0 1px 1px #000);
}
Compiler parsing error: Parse error in .....gss at line 1819 column 47:
-webkit-filter: drop-shadow(0 1px 1px #000);
Compiler flags:
--allow-unrecognized-properties
--allow-unrecognized-functions
Original issue reported on code.google.com by [email protected]
on 12 Oct 2012 at 1:59
What steps will reproduce the problem?
1. java -jar closure-stylesheets-20130114.jar style.css
2. style.css contains multiple declarations of background property in same rule
definition
3. error occurs
What is the expected output? What do you see instead?
Expected output would be correctly compiled css file:
body{background:white;background:red}
Instead of that I see following error output:
Detected multiple identical, non-alternate declarations in the same ruleset. If
this is intentional please use the /* @alternate */ annotation.
background:[red] in style.css at line 4 column 1:
}
^
1 error(s), 0 warning(s)
What version of the product are you using? On what operating system?
closure-stylesheets-20130114.jar
jdk-7u17-linux-x64
Ubuntu 11.10 x64
Please provide any additional information below.
Please provide command line argument which can turn off identical declarations
check. Many popular css components / frameworks uses identical property
declarations (css3please.com, jquery mobile, ...). So anytime I am integrating
/ upgrading such tool I have to fix their css files with /* @alternate */
command. Would be better to just turn off this check and save my time.
Original issue reported on code.google.com by [email protected]
on 11 Apr 2013 at 2:57
What steps will reproduce the problem?
1. pick a stylesheet
2. somewhere in that stylesheet put a class called 'a'
3. put a in --exluded-classes-from-renaming
What is the expected output? What do you see instead?
it is expected that no class will be renamed to 'a' as it is already in use
What version of the product are you using? On what operating system?
the latest
Please provide any additional information below.
came across this when adblock was hiding our site because 'body' was being
renamed to 'Ad' which was in the filters. Tried creating a class called 'Ad'
but that was being renamed and body was still 'Ad' so added it to the exclude
renaming but would be worse as 'body' was still 'Ad' and now we have two class
definitions for 'Ad'
Original issue reported on code.google.com by [email protected]
on 31 Aug 2012 at 9:02
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 [email protected]
on 24 Jun 2012 at 12:27
Attachments:
What steps will reproduce the problem?
Compiling following test stylesheet:
*:focus {
outline-offset: -1px;
outline: 1px solid black;
}
result was:
*:focus{outline:1px solid black}
outline-offset property simply omitted without error.
However, when properties places exchanged (outline property on top),
i got following error:
outline-offset is an unrecognized property in test.css at line 3 column 2:
outline-offset: -1px;
^
1 error(s), 0 warning(s)
What is the expected output? What do you see instead?
Error from compiler or outline-offset option in compiled css.
What version of the product are you using? On what operating system?
Revision: c9f1228275dc
Original issue reported on code.google.com by [email protected]
on 2 Oct 2012 at 8:48
Ability to import mixins from another gss file.
For example, if the `borderRadius` mixin was defined in the `commonMixins.gss`
file:
{{{
@import commonMixins.gss
.myBox {
@mixin borderRadius(3px);
}
}}}
Original issue reported on code.google.com by [email protected]
on 15 Nov 2011 at 8:42
In the ClosureCommandLineCompiler class the default constructor is protected,
but one of its parameter OutputInfo is private, which will not allow any other
class to call this constructor.
I'm building a system that will call the compiler directly in java without
using the command line itself, but this situation will block my call.
Original issue reported on code.google.com by [email protected]
on 12 Apr 2012 at 12:12
Added support for some new CSS Properties for text(from the W3C Working Draft)
Original issue reported on code.google.com by [email protected]
on 24 Mar 2012 at 9:12
Attachments:
In order to easier adoption of the library, please publish it in maven central
repo (same as closure compiler).
Thanks,
Alex
Original issue reported on code.google.com by [email protected]
on 13 Nov 2011 at 9:08
I would like to write browser conditioning with less coding.
This seems nice to me,
.item {
color: green;
/* @if (IE6) */ color: red;
}
if (--define IE6), two `color' will be output.
Closure Stylesheets would reach more complex web project than usual, so browser
conditioning would be more needed in order to handle performance issues.
What do you think?
Original issue reported on code.google.com by [email protected]
on 2 Feb 2012 at 10:29
Would be nice to be able to do something similar to this
@def IMAGES_DIR '/Content/Images/';
.icon.field.text {
background-image: url(IMAGES_DIR + 98-CoffeeCup.png);
}
Original issue reported on code.google.com by [email protected]
on 24 May 2013 at 1:52
New command line option '--input-rename-css-map-file'.
Ability to load a renaming css-map from external properties file added.
This is necessary if we need to create more than one compressed css-files that
have the same classes.
Original issue reported on code.google.com by [email protected]
on 10 Apr 2013 at 12:44
What steps will reproduce the problem?
1. source file:
body{border: 1px blue solid;}
#id{
width: 10px;
height: 20px;
}body{border: 1px blue solid;}
#id2{
width: 10px;
height: 20px;
}body{border: 1px blue solid;}
#id3{
width: 10px;
height: 20px;
}
out-file:
#id,#id2{width:10px;height:20px}body{border:1px blue
solid}#id3{width:10px;height:20px}
What is the expected output? What do you see instead?
expected :: #id,#id2,#id3{width:10px;height:20px}body{border:1px blue solid}
What version of the product are you using? On what operating system?
:: use stylesheets-20111230.jar
Original issue reported on code.google.com by [email protected]
on 27 Jun 2012 at 6:47
What steps will reproduce the problem?
1. Create a test.css file:
em:not(.a):not(.b) {
color: red;
}
2. Create a pretty-printed file with:
$ java -jarclosure-stylesheets.jar --pretty-print --output-file ./test.p.css test.css
3. Check its contents:
$ cat test.p.css
em:not(.a) :not(.b) {
color: red;
}
This is wrong, because the space added between both :not pseudo-classes changes
the meaning of this selector. The desired 'em' element will not be selected.
What is the expected output? What do you see instead?
The correct output is produced without the pretty-print flag:
$ java -jar tools/closure-stylesheets.jar --output-file ./test.c.css test.css
$ cat test.c.css
em:not(.a):not(.b){color:red}
What version of the product are you using? On what operating system?
Revision: 86bb800d79a3
Chrome 27.0.1453.116
Please provide any additional information below.
The following change seems to fix this issue (unsure if this is the right fix
though).
$ git diff
diff --git a/src/com/google/common/css/compiler/passes/PrettyPrinter.java
b/src/com/google/common/css/compiler/passes/PrettyPrinter.java
index 8a37b7c..9da9ab7 100644
--- a/src/com/google/common/css/compiler/passes/PrettyPrinter.java
+++ b/src/com/google/common/css/compiler/passes/PrettyPrinter.java
@@ -347,7 +347,7 @@ public class PrettyPrinter extends DefaultTreeVisitor
public void leavePseudoClass(CssPseudoClassNode node) {
if (node.getFunctionType() == FunctionType.NOT) {
deleteEndingIfEndingIs(", ");
- sb.append(") ");
+ sb.append(")");
}
}
Original issue reported on code.google.com by alo.and
on 4 Jul 2013 at 9:51
Hi,
Some color functions are missing in closure stylesheets. If I take less in
example, here are some interesting functions
http://lesscss.org/#-color-functions
Based on the last commit
(http://code.google.com/p/closure-stylesheets/source/detail?r=6edc1c4364256f20dc
a2b59eddc18e38f1a41935) I've implemented some of them :
* lighten(color, amount)
* darken(color, amount)
* saturate(color, amount)
* desaturate(color, amount)
* grayscale(color)
I join a patch which add functions. It's just a "quick and dirty" patch (based
on the code of addHsbToCssColor), but it seems to work.
In the hope you find it interesting.
++
Yves
Original issue reported on code.google.com by [email protected]
on 2 Dec 2011 at 12:25
Attachments:
What steps will reproduce the problem?
1. Create a input.css file:
---------------
#first, #second, #third {
width: 100px;
height: 100px;
color: #ff0000;
background-color: #00ff00;
}
#second {
width: 105px;
}
---------------
2. Run: java -jar closure-stylesheets.jar --output-file output.css input.css
What is the expected output? What do you see instead?
Expected (and YUI Compressor achieves this), 100 bytes:
---------------
#first,#second,#third{width:100px;height:100px;color:#f00;background-color:#0f0}
#second{width:105px}
---------------
With Closure I get a 204 byte file instead (original was 138!):
---------------
#first{width:100px;height:100px;color:#f00;background-color:#0f0}#second{height:
100px;color:#f00;background-color:#0f0}#third{width:100px;height:100px;color:#f0
0;background-color:#0f0}#second{width:105px}
---------------
What version of the product are you using? On what operating system?
I'm using the initial release, SHA1 5d8092ec7287f8b05b41ff71f52ff2dc0576f414
Windows 7 64bit SP1
Please provide any additional information below.
This sucks big time.
Original issue reported on code.google.com by xxStrom
on 15 Nov 2011 at 2:44
Would like to be able to have default mixin argument values:
{{{
@defmixin roundedBorder(SIZE = 3px) {
-moz-border-radius: SIZE;
-webkit-border-radius: SIZE;
border-radius: SIZE;
}
}}}
Original issue reported on code.google.com by [email protected]
on 15 Nov 2011 at 8:38
The compiler seems to stumble when running across this line:
@font-face {
font-family: 'MetaSerifMedium';
src: url('/font/MetaSerifWeb-Medium.eot?') format('eot'), url('/font/
MetaSerifWeb-Medium.woff') format('woff');
}
With this error:
Compiler parsing error: Parse error in gss/app.gss at line 2 column
16:
font-family: 'MetaSerifMedium';
^
com.google.common.css.compiler.ast.GssParserException: Parse error in
gss/app.gss at line 2 column 16:
font-family: 'MetaSerifMedium';
^
at
com.google.common.css.compiler.ast.GssParserCC.parse(GssParserCC.java:
162)
at com.google.common.css.compiler.ast.GssParser.parse(GssParser.java:
46)
at
com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.parseAndPr
int(DefaultCommandLineCompiler.java:
107)
at
com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.compile(De
faultCommandLineCompiler.java:
96)
at
com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.execute(De
faultCommandLineCompiler.java:
132)
at
com.google.common.css.compiler.commandline.ClosureCommandLineCompiler.executeJob
(ClosureCommandLineCompiler.java:
274)
at
com.google.common.css.compiler.commandline.ClosureCommandLineCompiler.main(Closu
reCommandLineCompiler.java:
347)
Is it possible to use @font-face w/ the compiler? Perhaps using a
different syntax? If it's not, is there planned support?
Original issue reported on code.google.com by [email protected]
on 21 Nov 2011 at 5:33
I have searched over hours for this , i just found one solution here :
https://groups.google.com/group/closure-stylesheets-discuss/tree/browse_frm/thre
ad/0f44c33220fe54d8/09a1f2cd660aa8f1?rnum=1&_done=%2Fgroup%2Fclosure-stylesheets
-discuss%2Fbrowse_frm%2Fthread%2Ff44c33220fe54d8%2F09a1f2cd660aa8f1%3Ftvc%3D1%26
I think , if Google can release a plugin for eclipse with highlight effect and
suggestion then developer can grow up with this faster
Original issue reported on code.google.com by [email protected]
on 27 Jun 2012 at 4:45
What steps will reproduce the problem?
1. set "--output-file" to a non-existent file path
2. error message "The compiler encountered an unhadled error condition."
What is the expected output? What do you see instead?
"The compiler encountered an unhandled error condition."
What version of the product are you using? On what operating system?
Build date 20111215. Windows XP
Please provide any additional information below.
Cheers :)
Original issue reported on code.google.com by [email protected]
on 4 Feb 2012 at 2:18
What steps will reproduce the problem?
When a string contains a unicode character specification, it does not parse
properly. Specifically, it works when it is 6 digits long, but not if it is
less.
This works:
.rule:after { content: " \00203a "; }
This breaks:
.rule:after { content: " \203a "; }
This should be allowed according to the CSS2 spec:
http://www.w3.org/TR/CSS2/syndata.html#characters
Original issue reported on code.google.com by [email protected]
on 15 Mar 2013 at 3:13
Discovered when trying to compress output from Twitter Bootstrap (likely
affects lots of other users too).
Michael Bolin addressed this issue in this thread but I don't see a fix ever
being checked in:
http://stackoverflow.com/questions/8453719/closure-stylesheets-parse-error-with-
twitters-bootstrap-css
Input:
.test{ font-size:20px;outline:thin dotted \9; }
Output
GssParserException: Parse error in test at line 1 column 44
Original issue reported on code.google.com by [email protected]
on 30 May 2012 at 5:58
When we do a deep copy of the CssTree, the SourceCodeLocation field of the
CssRulesetNode's are not copied.
The side effect is that when a error is reported via a GssError, we receive a
NullPointerException instead
of the error message.
Patch attached
Original issue reported on code.google.com by [email protected]
on 7 Apr 2014 at 4:08
Attachments:
What steps will reproduce the problem?
1. d:\Work\test>java -jar bin/closure-stylesheets.jar --rename CLOSURE
--output-file build/outputcompiled.css css/test.css
Contents of test.css:
.test{
width: calc(100% - 1px);
}
What is the expected output?
Expect to see minified css in file named outputcompiled.css
What do you see instead?
Compiler parsing error: Parse error in css/test.css at line 2 column 22:
width: calc(100% - 1px);
^
com.google.common.css.compiler.ast.GssParserException: Parse error in
css/test.css at line 2 column 22:
width: calc(100% - 1px);
^
at com.google.common.css.compiler.ast.GssParserCC.parse(GssParserCC.java:176)
at com.google.common.css.compiler.ast.GssParser.parse(GssParser.java:46)
at com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.parseAndPrint(DefaultCommandLineCompiler.ja
va:104)
at com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.compile(DefaultCommandLineCompiler.java:94)
at com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.execute(DefaultCommandLineCompiler.java:129
)
at com.google.common.css.compiler.commandline.ClosureCommandLineCompiler.executeJob(ClosureCommandLineCompiler.java:
290)
at com.google.common.css.compiler.commandline.ClosureCommandLineCompiler.main(ClosureCommandLineCompiler.java:356)
Caused by: com.google.common.css.compiler.ast.ParseException: Encountered " <S>
" "" at line 2, column 22.
Was expecting:
<NUMBER> ...
at com.google.common.css.compiler.ast.GssParserCC.generateParseException(GssParserCC.java:3756)
at com.google.common.css.compiler.ast.GssParserCC.jj_consume_token(GssParserCC.java:3635)
at com.google.common.css.compiler.ast.GssParserCC.term(GssParserCC.java:1562)
at com.google.common.css.compiler.ast.GssParserCC.slash_term(GssParserCC.java:1494)
at com.google.common.css.compiler.ast.GssParserCC.assign_term(GssParserCC.java:1446)
at com.google.common.css.compiler.ast.GssParserCC.composite_term(GssParserCC.java:1397)
at com.google.common.css.compiler.ast.GssParserCC.expr(GssParserCC.java:1379)
at com.google.common.css.compiler.ast.GssParserCC.function(GssParserCC.java:2092)
at com.google.common.css.compiler.ast.GssParserCC.term(GssParserCC.java:1682)
at com.google.common.css.compiler.ast.GssParserCC.slash_term(GssParserCC.java:1494)
at com.google.common.css.compiler.ast.GssParserCC.assign_term(GssParserCC.java:1446)
at com.google.common.css.compiler.ast.GssParserCC.composite_term(GssParserCC.java:1397)
at com.google.common.css.compiler.ast.GssParserCC.expr(GssParserCC.java:1370)
at com.google.common.css.compiler.ast.GssParserCC.standardDeclaration(GssParserCC.java:1335)
at com.google.common.css.compiler.ast.GssParserCC.styleDeclaration(GssParserCC.java:1193)
at com.google.common.css.compiler.ast.GssParserCC.ruleSet(GssParserCC.java:463)
at com.google.common.css.compiler.ast.GssParserCC.block(GssParserCC.java:2856)
at com.google.common.css.compiler.ast.GssParserCC.start(GssParserCC.java:2903)
at com.google.common.css.compiler.ast.GssParserCC.parse(GssParserCC.java:174)
... 6 more
What version of the product are you using? On what operating system?
Latest from git, windows 7.
Please provide any additional information below.
option
--allowed_non_standard_function calc()
won't help.
Original issue reported on code.google.com by [email protected]
on 11 Oct 2013 at 9:49
Would be great to have an ability to preprocess css files that way that
data-uri would appear in css instead of images. As not all browsers support
data-uri (IE 7 and earlier, IE8 only 32Kb), this can be an optional parameter
like "--replace_image_with_data_uri".
Also by default root path for image path in css can be considered path to
processed stylesheet. But that could be changed explicitly by providing --root
argument. --root argument can have local folder path or web url images will be
fetched from.
Original issue reported on code.google.com by [email protected]
on 30 Nov 2011 at 7:18
Added new functions.
Original issue reported on code.google.com by [email protected]
on 4 Sep 2013 at 12:26
Attachments:
Example:
/* Does not generate error. */
@def RANDOM_COLOR randomColor('light');
/* Correctly generates error: Unknown function "randomColor". */
button {
color: randomColor('light');
}
Original issue reported on code.google.com by [email protected]
on 29 May 2012 at 2:48
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.