Skip to content

Commit ce1ce8d

Browse files
committed
FIX: and keyword in media queries must be separated with a space
1 parent 1aee531 commit ce1ce8d

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

css.reb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Rebol [
33
type: module
44
name: css
55
Date: 14-Mar-2025
6-
Version: 0.1.0
6+
Version: 0.1.1
77
Author: @Oldes
88
Home: https://github.com/Oldes/Rebol-CSS
99
Rights: MIT
@@ -138,6 +138,8 @@ css-minify: function [tokens][
138138
]
139139
| #"+" ahead number!
140140
| #"-" ahead quote 0
141+
;= and in a media query must be separated with a space
142+
| "and" #" " ahead #"(" keep ("and ")
141143
| keep skip
142144
]]
143145
]

tests.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,12 @@ a{background-image:url("http://dude.com");background:url("http://dude.com/hello
181181
<!--==-->
182182
a,b{color:white}
183183
<!----------------------------------->
184+
185+
@media only all and ( max-width: 50em ), only all and (max-device-width : 800px), only all and (max-width:780px) {
186+
.theClass {
187+
some-css : here
188+
}
189+
}
190+
<!--==-->
191+
@media only all and (max-width:50em),only all and (max-device-width:800px),only all and (max-width:780px){.theClass{some-css:here}}
192+
<!----------------------------------->

0 commit comments

Comments
 (0)