@@ -165,39 +165,41 @@ impl<'self, I: Iterator<&'self ComponentValue>> ToCss for I {
165
165
)
166
166
loop { match self . next ( ) { None => break , Some ( component_value) => {
167
167
let ( a, b) = ( previous, component_value) ;
168
- if (
169
- matches ! ( * a, Hash ( * ) | IDHash ( * ) | AtKeyword ( * ) ) &&
170
- matches ! ( * b, Number ( * ) | Percentage ( * ) | Ident ( * ) | Dimension ( * ) |
171
- UnicodeRange ( * ) | URL ( * ) | Function ( * ) )
172
- ) || (
173
- matches ! ( * a, Number ( * ) | Ident ( * ) | Dimension ( * ) ) &&
174
- matches ! ( * b, Number ( * ) | Ident ( * ) | Dimension ( * ) )
175
- ) || (
176
- matches ! ( * a, Number ( * ) | Ident ( * ) | Dimension ( * ) ) &&
177
- matches ! ( * b, Percentage ( * ) | UnicodeRange ( * ) | URL ( * ) | Function ( * ) )
178
- ) || (
179
- matches ! ( * a, Ident ( * ) ) &&
180
- matches ! ( * b, ParenthesisBlock ( * ) )
181
- ) || (
182
- matches ! ( * a, Delim ( '#' ) | Delim ( '@' ) ) &&
183
- !matches ! ( * b, WhiteSpace )
184
- ) || (
185
- matches ! ( * a, Delim ( '-' ) | Delim ( '+' ) | Delim ( '.' ) | Delim ( '<' ) |
186
- Delim ( '>' ) | Delim ( '!' ) ) &&
187
- !matches ! ( * b, WhiteSpace )
188
- ) || (
189
- !matches ! ( * a, WhiteSpace ) &&
190
- matches ! ( * b, Delim ( '-' ) | Delim ( '+' ) | Delim ( '.' ) | Delim ( '<' ) |
191
- Delim ( '>' ) | Delim ( '!' ) )
192
- ) || (
193
- matches ! ( * a, Delim ( '/' ) ) &&
194
- matches ! ( * b, Delim ( '*' ) )
195
- ) || (
196
- matches ! ( * a, Delim ( '*' ) ) &&
197
- matches ! ( * b, Delim ( '/' ) )
198
- ) {
199
- css. push_str ( "/**/" )
200
- }
168
+ // FIXME: this is incorrect.
169
+ // See https://github.com/mozilla-servo/rust-cssparser/issues/24
170
+ // if (
171
+ // matches!(*a, Hash(*) | IDHash(*) | AtKeyword(*)) &&
172
+ // matches!(*b, Number(*) | Percentage(*) | Ident(*) | Dimension(*) |
173
+ // UnicodeRange(*) | URL(*) | Function(*))
174
+ // ) || (
175
+ // matches!(*a, Number(*) | Ident(*) | Dimension(*)) &&
176
+ // matches!(*b, Number(*) | Ident(*) | Dimension(*))
177
+ // ) || (
178
+ // matches!(*a, Number(*) | Ident(*) | Dimension(*)) &&
179
+ // matches!(*b, Percentage(*) | UnicodeRange(*) | URL(*) | Function(*))
180
+ // ) || (
181
+ // matches!(*a, Ident(*)) &&
182
+ // matches!(*b, ParenthesisBlock(*))
183
+ // ) || (
184
+ // matches!(*a, Delim('#') | Delim('@')) &&
185
+ // !matches!(*b, WhiteSpace)
186
+ // ) || (
187
+ // matches!(*a, Delim('-') | Delim('+') | Delim('.') | Delim('<') |
188
+ // Delim('>') | Delim('!')) &&
189
+ // !matches!(*b, WhiteSpace)
190
+ // ) || (
191
+ // !matches!(*a, WhiteSpace) &&
192
+ // matches!(*b, Delim('-') | Delim('+') | Delim('.') | Delim('<') |
193
+ // Delim('>') | Delim('!'))
194
+ // ) || (
195
+ // matches!(*a, Delim('/')) &&
196
+ // matches!(*b, Delim('*'))
197
+ // ) || (
198
+ // matches!(*a, Delim('*')) &&
199
+ // matches!(*b, Delim('/'))
200
+ // ) {
201
+ // css.push_str("/**/")
202
+ // }
201
203
component_value. to_css_push ( css) ;
202
204
previous = component_value;
203
205
} } }
0 commit comments