Comments (8)
Can you reproduce this with the latest version from GitHub?
from closure-stylesheets.
yes I do
from closure-stylesheets.
Our @media
parsing is a bit fragile. I'm not going to have time to look at this in the near future, so if you can narrow down the problem, that would help. Otherwise, I'll get to this in about three weeks.
from closure-stylesheets.
Ok will do, for starters here is the stacktrace
Caused by: com.google.common.css.compiler.ast.GssParserException: Parse error in /path/to/style.css at line 1 column 26:
@media screen and (color), (max-width: 60em) {
^
at com.google.common.css.compiler.ast.GssParserCC.parse(GssParserCC.java:227)
at com.google.common.css.compiler.ast.GssParserCC.parse(GssParserCC.java:247)
at com.google.common.css.compiler.ast.AbstractGssParser.parseInternal(AbstractGssParser.java:56)
at com.google.common.css.compiler.ast.GssParser.parse(GssParser.java:46)
at com.google.common.css.compiler.ast.GssParser.parse(GssParser.java:42)
at com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.parseAndPrint(DefaultCommandLineCompiler.java:120)
at com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.compile(DefaultCommandLineCompiler.java:110)
at com.google.common.css.compiler.commandline.DefaultCommandLineCompiler$compile.call(Unknown Source)
at io.silksmith.css.gss.GSSTask.compile(GSSTask.groovy:104)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
... 56 more
Caused by: com.google.common.css.compiler.ast.ParseException: Encountered " "," ", "" at line 1, column 26.
Was expecting one of:
";" ...
"{" ...
<AND> ...
<OR> ...
<S> ...
at com.google.common.css.compiler.ast.GssParserCC.generateParseException(GssParserCC.java:5062)
at com.google.common.css.compiler.ast.GssParserCC.at_rule(GssParserCC.java:2964)
at com.google.common.css.compiler.ast.GssParserCC.block(GssParserCC.java:3630)
at com.google.common.css.compiler.ast.GssParserCC.start(GssParserCC.java:3723)
at com.google.common.css.compiler.ast.GssParserCC.parse(GssParserCC.java:222)
... 65 more
Don't get confused by the gradle part in the callstack as I'm calling it from there
from closure-stylesheets.
I stumbled upon this problem when I wanted to rename the bootstrap css the @media screen and (color),(max-width: 60em)
was simplified sample.
https://github.com/twbs/bootstrap/blob/master/dist/css/bootstrap.css#L6307
from closure-stylesheets.
Thanks for the pointers. I'll take a look as this is clearly a bug.
from closure-stylesheets.
I know this is an old thread, but I confirmed this bug still exists in some html validators, for example https://validator.w3.org/ . It doesn't like the comma-separated terms. The workaround I found is, remove the commas and create separate statements, for the example given by mxab above, use:
@media screen and (color) { .stuff { background-color: red; } }
@media screen and (max-width: 60em) { .stuff { background-color: red; } }
Hope this helps somebody.
from closure-stylesheets.
com.google.common.css.compiler.ast.GssParserException: Parse error in bootstrap-grid.css at line 8 column 24:
width: device-width;
from closure-stylesheets.
Related Issues (20)
- incorrect error on nested @-rules HOT 2
- closure-stylesheets.jar missing? HOT 1
- Crash when using non-empty input-renaming-map HOT 11
- Does not work with feature queries @supports
- Building closure stylesheets with Webpack
- box-decoration-break is an unrecognized property HOT 2
- Expand MergeAdjacentRulesetNodesWithSameDeclarations functionality to any repetitive rulesets
- Non splitting renaming type
- @supports throws "unknown @ rule" error
- Parsing error with css calc and negative number
- Parse error with calc()
- Unable to parse source maps
- RTL flipping does not handle transform, linear-gradient properties
- Can't parse grid layout css syntax using named grid lines
- List is missing 'all' property. Giving compile error.
- Escaped characters in css-identifier throws compiler parsing error
- How can i solve the GssParserException problem
- Dead project? HOT 2
- There is a vulnerability in Guava: Google Core Libraries for Java 20.0,upgrade recommended
- text-size-adjust is an unrecognized property
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from closure-stylesheets.