Permalink
Browse files

Fixes #619 Support slash in media

  • Loading branch information...
1 parent fdb322b commit c20cc717c402d02d72dd4162bb42c3ec32a1da3a @tonistiigi committed Oct 25, 2012
Showing with 9 additions and 1 deletion.
  1. +1 −1 lib/lexer.js
  2. +5 −0 test/cases/regression.619.css
  3. +3 −0 test/cases/regression.619.styl
View
@@ -456,7 +456,7 @@ Lexer.prototype = {
media: function() {
var captures;
- if (captures = /^@media[ \t]*([^\/{\n]+)/.exec(this.str)) {
+ if (captures = /^@media[ \t]*(.+?)(?=\/\/|[\n{])/.exec(this.str)) {
this.skip(captures);
return new Token('media', captures[1].trim());
}
@@ -0,0 +1,5 @@
+@media only screen and (-o-min-device-pixel-ratio: 3/2) {
+ body {
+ font-size: 66%;
+ }
+}
@@ -0,0 +1,3 @@
+@media only screen and (-o-min-device-pixel-ratio: 3/2)
+ body
+ font-size 66%

0 comments on commit c20cc71

Please sign in to comment.