@@ -458,12 +458,12 @@ class Processor {
458
458
* Check for grid/flexbox options.
459
459
*/
460
460
disabledDecl ( node , result ) {
461
- if ( this . gridStatus ( node , result ) === false && node . type === 'decl' ) {
461
+ if ( node . type === 'decl' && this . gridStatus ( node , result ) === false ) {
462
462
if ( node . prop . includes ( 'grid' ) || node . prop === 'justify-items' ) {
463
463
return true
464
464
}
465
465
}
466
- if ( this . prefixes . options . flexbox === false && node . type === 'decl' ) {
466
+ if ( node . type === 'decl' && this . prefixes . options . flexbox === false ) {
467
467
let other = [ 'order' , 'justify-content' , 'align-items' , 'align-content' ]
468
468
if ( node . prop . includes ( 'flex' ) || other . includes ( node . prop ) ) {
469
469
return true
@@ -641,15 +641,16 @@ class Processor {
641
641
} )
642
642
643
643
// Selectors
644
- for ( let checker of this . prefixes . remove . selectors ) {
645
- css . walkRules ( ( rule , i ) => {
644
+ css . walkRules ( ( rule , i ) => {
645
+ if ( this . disabled ( rule , result ) ) return
646
+
647
+ for ( let checker of this . prefixes . remove . selectors ) {
646
648
if ( checker . check ( rule ) ) {
647
- if ( ! this . disabled ( rule , result ) ) {
648
- rule . parent . removeChild ( i )
649
- }
649
+ rule . parent . removeChild ( i )
650
+ return
650
651
}
651
- } )
652
- }
652
+ }
653
+ } )
653
654
654
655
return css . walkDecls ( ( decl , i ) => {
655
656
if ( this . disabled ( decl , result ) ) return
0 commit comments