-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Proposal: refactor css placeholder for TemplateLiteral #6790
Copy link
Copy link
Open
Labels
lang:css/scss/lessIssues affecting CSS, Less or SCSSIssues affecting CSS, Less or SCSS
Description
CSS in template literals is first added in #2102 @prettier-placeholder is choosed to be a placeholder for template quasis.
Now problem is TemplateLiteral could be anywhere of the css code
as tag
${as-tag}{}
@prettier-placeholder{}
tag selector became a at-rule, but we handled in at-rule
as part of tag
foo${as-part-of-tag}{}
foo@prettier-placeholder{}
foo[${as-part-of-selector}]{}
foo[@prettier-placeholder]{}
foo@prettier-placeholder is not a legal tag,postcss-selector-parser can parse currectly, but might cause problem in future,
as value
div{
font: bar${as-part-of-selector}
}
div{
font: bar@prettier-placeholder
}
bar@prettier-placeholder will be to values, a word and a at-word,
will comment more details
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
lang:css/scss/lessIssues affecting CSS, Less or SCSSIssues affecting CSS, Less or SCSS