Created
March 15, 2022 00:57
-
-
Save ybiquitous/eabe11abd1ecb1feae79614ed12502bb to your computer and use it in GitHub Desktop.
PostCSS DeclarationRaws bug reproduction
This file contains hidden or 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
const postcss = require("postcss"); | |
const src = "a { background: linear-gradient(to right, #fff, #ddd) }"; | |
postcss.parse(src).walkDecls((decl) => { | |
console.log(decl.raws.value.raw); | |
}); |
This file contains hidden or 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
{ | |
"dependencies": { | |
"postcss": "8.4.8", | |
"typescript": "4.6.2" | |
}, | |
"scripts": { | |
"tsc": "tsc --noEmit --checkJs --strict --target es2020 --module commonjs *.js", | |
"test": "npm run tsc && node *.js" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reproduction steps
npm i
npm t
Output
Environment