@@ -381,29 +381,7 @@ class SassParser {
381
381
declarationDelimiter ( node ) {
382
382
this . raws . before += node . content
383
383
}
384
- /* loop (node, parent) {
385
- const loop = postcss.rule()
386
- this.raws.comment = false
387
- this.raws.multiRule = false
388
- this.raws.loop = true
389
- loop.selector = ''
390
- loop.raws = {
391
- before: this.raws.before || DEFAULT_RAWS_RULE.before,
392
- between: DEFAULT_RAWS_RULE.between
393
- }
394
- if (this.raws.beforeMulti) {
395
- loop.raws.before += this.raws.beforeMulti
396
- this.raws.beforeMulti = undefined
397
- }
398
- node.content.forEach((contentNode, i) => {
399
- if (node.content[i + 1] && node.content[i + 1].type === 'block') {
400
- this.raws.loop = false
401
- }
402
- this.process(contentNode, loop)
403
- })
404
- parent.nodes.push(loop)
405
- this.raws.loop = false
406
- }*/
384
+
407
385
atkeyword ( node , parent ) {
408
386
parent . selector += `@${ node . content } `
409
387
}
@@ -421,7 +399,7 @@ class SassParser {
421
399
parent . selector += node . content
422
400
}
423
401
424
- atrule ( node , parent ) {
402
+ atrule ( node , parent ) {
425
403
// Loop to find the deepest ruleset node
426
404
this . raws . multiRuleProp = ''
427
405
@@ -430,9 +408,7 @@ class SassParser {
430
408
case 'block' : {
431
409
// Create Rule node
432
410
const atrule = postcss . atRule ( )
433
- atrule . name = node . type === 'atrule'
434
- ? 'media'
435
- : node . type
411
+ atrule . name = node . type === 'atrule' ? 'media' : node . type
436
412
atrule . nodes = [ ]
437
413
438
414
// Object to store raws for Atrule
@@ -493,11 +469,11 @@ class SassParser {
493
469
} )
494
470
}
495
471
496
- mixin ( node , parent ) {
472
+ mixin ( node , parent ) {
497
473
this . atrule ( node , parent )
498
474
}
499
475
500
- include ( node , parent ) {
476
+ include ( node , parent ) {
501
477
// Loop to find the deepest ruleset node
502
478
this . raws . multiRuleProp = ''
503
479
@@ -517,7 +493,7 @@ class SassParser {
517
493
this . raws . comment = false
518
494
519
495
// create a 'selector'('atname' + atRuleRaws.afterName + 'atrule parameters') string from the node
520
- let atSelectorString = this . extractSource (
496
+ const atSelectorString = this . extractSource (
521
497
node . start ,
522
498
{
523
499
line : node . content [ node . content . length - 1 ] . start . line ,
@@ -546,10 +522,10 @@ class SassParser {
546
522
parent . nodes . push ( atrule )
547
523
}
548
524
549
- loop ( node , parent ) {
525
+ loop ( node , parent ) {
550
526
this . atrule ( node , parent )
551
527
}
552
- extend ( node , parent ) {
528
+ extend ( node , parent ) {
553
529
// Loop to find the deepest ruleset node
554
530
this . raws . multiRuleProp = ''
555
531
0 commit comments