-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use scss syntax for parsing css to allow inline comments
- Loading branch information
Showing
3 changed files
with
9 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import postcss from 'postcss'; | ||
import postcssNested from 'postcss-nested'; | ||
import postcssScss from 'postcss-scss'; | ||
|
||
export default function process(css: string, from: string) { | ||
return postcss([postcssNested()]).process(css, { | ||
from, | ||
syntax: postcssScss, | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jquense
Author
Contributor
|
||
map: { | ||
inline: true, | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7885,12 +7885,7 @@ [email protected]: | |
resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" | ||
integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== | ||
|
||
mime@^2.4.4: | ||
version "2.4.6" | ||
resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.6.tgz#e5b407c90db442f2beb5b162373d07b69affa4d1" | ||
integrity sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA== | ||
|
||
mime@~2.5.2: | ||
mime@^2.4.4, mime@~2.5.2: | ||
version "2.5.2" | ||
resolved "https://registry.yarnpkg.com/mime/-/mime-2.5.2.tgz#6e3dc6cc2b9510643830e5f19d5cb753da5eeabe" | ||
integrity sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg== | ||
|
@@ -8028,11 +8023,6 @@ nanoid@^2.0.3: | |
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280" | ||
integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== | ||
|
||
nanoid@^3.1.20: | ||
version "3.1.20" | ||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788" | ||
integrity sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw== | ||
|
||
nanoid@^3.1.30: | ||
version "3.1.30" | ||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.30.tgz#63f93cc548d2a113dc5dfbc63bfa09e2b9b64362" | ||
|
@@ -8969,7 +8959,7 @@ postcss@^5.0.18: | |
source-map "^0.5.6" | ||
supports-color "^3.2.3" | ||
|
||
postcss@^8.0.0: | ||
postcss@^8.0.0, postcss@^8.2.8: | ||
version "8.3.11" | ||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.11.tgz#c3beca7ea811cd5e1c4a3ec6d2e7599ef1f8f858" | ||
integrity sha512-hCmlUAIlUiav8Xdqw3Io4LcpA1DOt7h3LSTAC4G6JGHFFaWzI6qvFt9oilvl8BmkbBRX1IhM90ZAmpk68zccQA== | ||
|
@@ -8978,15 +8968,6 @@ postcss@^8.0.0: | |
picocolors "^1.0.0" | ||
source-map-js "^0.6.2" | ||
|
||
postcss@^8.2.8: | ||
version "8.2.8" | ||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.8.tgz#0b90f9382efda424c4f0f69a2ead6f6830d08ece" | ||
integrity sha512-1F0Xb2T21xET7oQV9eKuctbM9S7BC0fetoHCc4H13z0PT6haiRLP4T0ZY4XWh7iLP0usgqykT6p9B2RtOf4FPw== | ||
dependencies: | ||
colorette "^1.2.2" | ||
nanoid "^3.1.20" | ||
source-map "^0.6.1" | ||
|
||
prelude-ls@^1.2.1: | ||
version "1.2.1" | ||
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" | ||
|
Could this be an opt-in? In my projects I've only allowed pure CSS (as defined by postcss-preset-env)