File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -382,7 +382,7 @@ function parseNestedCSS(node, options) {
382382
383383 if ( node . type === "css-atrule" ) {
384384 // mixin
385- if ( node . mixin ) {
385+ if ( options . parser !== "scss" && node . mixin ) {
386386 const source =
387387 node . raws . identifier +
388388 node . name +
@@ -394,12 +394,12 @@ function parseNestedCSS(node, options) {
394394 }
395395
396396 // function
397- if ( node . function ) {
397+ if ( options . parser !== "scss" && node . function ) {
398398 return node ;
399399 }
400400
401401 // only css support custom-selector
402- if ( node . name === "custom-selector " && options . parser === "css " ) {
402+ if ( options . parser === "css " && node . name === "custom-selector " ) {
403403 const customSelector = node . params . match ( / : - - \S + ?\s + / ) [ 0 ] . trim ( ) ;
404404 node . customSelector = customSelector ;
405405 node . selector = parseSelector (
@@ -428,7 +428,7 @@ function parseNestedCSS(node, options) {
428428 }
429429
430430 // Less variable
431- if ( node . variable ) {
431+ if ( options . parser !== "scss" && node . variable ) {
432432 delete node . params ;
433433 return node ;
434434 }
You can’t perform that action at this time.
0 commit comments