postcss-styl
Advanced tools
Comparing version 0.5.10 to 0.5.11
@@ -13,2 +13,3 @@ "use strict" | ||
const parseExpression = require("./parse-expression") | ||
const parseMediaParams = require("./parse-media-params") | ||
const getSelectorEndIndex = require("./get-selector-end-index") | ||
@@ -410,3 +411,3 @@ const getCssLiteralIndices = require("./get-css-literal-indices") | ||
media(node, parent, info) { | ||
this.atruleImpl( | ||
const atRule = this.atruleImpl( | ||
node, | ||
@@ -419,2 +420,24 @@ { | ||
) | ||
const startIndex = | ||
this.sourceCode.getIndex(atRule.source.start) + | ||
6 /* @media */ + | ||
atRule.raws.afterName.length | ||
const paramsText = | ||
(atRule.raws.params && | ||
(atRule.raws.params.stylus || atRule.raws.params.raw)) || | ||
atRule.params | ||
const mediaParams = parseMediaParams( | ||
this.sourceCode, | ||
startIndex, | ||
startIndex + paramsText.length - 1 | ||
) | ||
if ( | ||
mediaParams.raw.stylus !== mediaParams.raw.raw && | ||
mediaParams.params !== atRule.params | ||
) { | ||
atRule.raws.params = mediaParams.raw | ||
atRule.params = mediaParams.params | ||
} | ||
} | ||
@@ -421,0 +444,0 @@ |
{ | ||
"name": "postcss-styl", | ||
"version": "0.5.10", | ||
"version": "0.5.11", | ||
"description": "PostCSS parser plugin for converting Stylus syntax to PostCSS AST.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
124355
28
3790