Created
November 30, 2023 10:02
-
-
Save nmn/d9f8e9e8576ae6a5740bb5e1bdd97cfd to your computer and use it in GitHub Desktop.
Prettier Experimental Ternaries - Good Cases
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 header = | |
useLayers ? | |
'\n@layer ' + | |
grouped.map((_, index) => `priority${index + 1}`).join(', ') + | |
';\n' | |
: ''; | |
return useLayers ? | |
`@layer priority${index + 1}{\n${collectedCSS}\n}` | |
: collectedCSS; | |
const pos = | |
selector.includes('::') ? | |
selector.indexOf('::') | |
: selector.lastIndexOf('{'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment