[Bug] stylelint customSyntax postcss-lit deletes custom variables
- 主要語言
- TypeScript
- 星號
- 90
- 分支
- 9
- 平均合併
- 1 天 9 分鐘
- 30 天內合併 PR
- 3
描述
First of all big thanks for fixing the main issue with variables inside string literals in css files for lit components.
The bug happens when you are using both a linter (to cut long lines of css into multiple lines) and stylelint with customSyntax postcss-lit in the following scenario:
let's assume we have the following css (single line css selector):
.long-class-name-container.${veryLongVariableNameAddedHere} .small-image-container span ${anotherVeryLongVariableNameAddedHere} img {
width: 100%;
height: 100%;
}
This will get parsed after linting into:
.long-class-name-container.${veryLongVariableNameAddedHere}
.small-image-container
span
${anotherVeryLongVariableNameAddedHere}
img {
width: 100%;
height: 100%;
}
And after stylelint into:
.general-takeover-container./* missing variable veryLongVariableNameAddedHere here*/
.small-image-container
span
/* missing variable anotherVeryLongVariableNameAddedHere here*/
img {
width: 100%;
height: 100%;
}
This is not happening when for example we have only one ${variable} at the end with "{" and gets parsed on the last line like:
.long-class-name-container .small-image-container span ${anotherVeryLongVariableNameAddedHere} {
into .long-class-name-container
.small-image-container
span
${anotherVeryLongVariableNameAddedHere} {
width: 100%;
height: 100%;
}
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。