Commit 3122b65 1 parent b93c9c5 commit 3122b65 Copy full SHA for 3122b65
File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -7111,6 +7111,16 @@ mod tests {
7111
7111
"@scope(._8Z4fiW_a) to (._8Z4fiW_b){._8Z4fiW_foo{color:red}}",
7112
7112
pure_css_module_options.clone(),
7113
7113
);
7114
+ minify_test_with_options(
7115
+ "/* cssmodules-pure-no-check */ :global(.foo) { color: red }",
7116
+ ".foo{color:red}",
7117
+ pure_css_module_options.clone(),
7118
+ );
7119
+ minify_test_with_options(
7120
+ "/*! some license */ /* cssmodules-pure-no-check */ :global(.foo) { color: red }",
7121
+ "/*! some license */\n.foo{color:red}",
7122
+ pure_css_module_options.clone(),
7123
+ );
7114
7124
7115
7125
error_test(
7116
7126
"input.defaultCheckbox::before h1 {width: 20px}",
Original file line number Diff line number Diff line change @@ -172,6 +172,11 @@ where
172
172
cssparser:: Token :: Comment ( comment) if comment. starts_with ( '!' ) => {
173
173
license_comments. push ( ( * comment) . into ( ) ) ;
174
174
}
175
+ cssparser:: Token :: Comment ( comment) if comment. contains ( "cssmodules-pure-no-check" ) => {
176
+ if let Some ( css_modules) = & mut options. css_modules {
177
+ css_modules. pure = false ;
178
+ }
179
+ }
175
180
_ => break ,
176
181
}
177
182
state = parser. state ( ) ;
You can’t perform that action at this time.
0 commit comments