Git Product home page Git Product logo

Comments (8)

iflan avatar iflan commented on April 28, 2024

Can you reproduce this with the latest version from GitHub?

from closure-stylesheets.

mxab avatar mxab commented on April 28, 2024

yes I do

from closure-stylesheets.

iflan avatar iflan commented on April 28, 2024

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.

mxab avatar mxab commented on April 28, 2024

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.

mxab avatar mxab commented on April 28, 2024

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.

iflan avatar iflan commented on April 28, 2024

Thanks for the pointers. I'll take a look as this is clearly a bug.

from closure-stylesheets.

codewavedave avatar codewavedave commented on April 28, 2024

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.

buckelieg avatar buckelieg commented on April 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.