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

ie5 hack creating confusion #13

Closed
stoyan opened this issue Jun 10, 2014 · 2 comments
Closed

ie5 hack creating confusion #13

stoyan opened this issue Jun 10, 2014 · 2 comments
Assignees
Labels

Comments

@stoyan
Copy link

stoyan commented Jun 10, 2014

@media tty { 
  i{content:"\";/*" "*/}} a { color: black; } /*";}
}

a {color: white}

The hack itself is handled ok - two strings in the content property

The problem is that the next ruleset is considered part of the media block, while it should be outside of it

Test code:

var mensch = require('mensch');
var css = require('fs').readFileSync('./examples/css.css').toString();
var parsed = mensch.parse(css);
var res = mensch.stringify(parsed, {indentation: '  '})

console.log(res)

Result:

@media tty {
  i {
    content: "\";/*" "*/}} a { color: black; } /*";
  }

  a {
    color: white;
  }
}
@stoyan
Copy link
Author

stoyan commented Jun 10, 2014

Source: http://www.csszengarden.com/057/

@bago
Copy link
Collaborator

bago commented Oct 27, 2014

mensch currently parses "}" and "{" inside strings while they should be ignored (it currently only ignores them inside a comment).

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

No branches or pull requests

3 participants