Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@media in @-moz-document #83

Open
Gvozd opened this issue Aug 31, 2016 · 2 comments
Open

@media in @-moz-document #83

Gvozd opened this issue Aug 31, 2016 · 2 comments

Comments

@Gvozd
Copy link

Gvozd commented Aug 31, 2016

crash at parsing

var CSSOM = require('cssom');
var css;
try {
    css = CSSOM.parse(`
        @-moz-document url-prefix() {
            @media only screen{
                #main {
                    color:red;
                }
            }
        }   
    `);
    console.log(css);
}catch(e) {
/* Error
{ [Error: Unexpected } (line 8, char 3)]
  line: 8,
  char: 3,
  styleSheet: CSSStyleSheet { parentStyleSheet: null, cssRules: [ [Object] ] } }

*/
    console.log(e);
}

css = CSSOM.parse(`
    @-moz-document url-prefix() {
        #main {
            color:red;
        }
    }
    @media only screen{
        #main {
            color:red;
        }
    }
`);
console.log(css);// works
@Gvozd Gvozd mentioned this issue Sep 3, 2016
@ameinhardt
Copy link

ameinhardt commented Mar 26, 2019

Same problem when using mocka with Vuetify / VGrid. It produces

@-moz-document url-prefix() {
@media print {
    .v-content {
      display: block;
    }
}
}

I think vuetify uses Jest and removes CSS completely via Jest-CSS-Modules

@danielschwartz85
Copy link

same here with:
parse("@svg-load url(./some.svg){ .path{} }")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants