-
-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Description
Quoted.value returns the text of the string token as written in the stylesheet. This is useful in some circumstances, but in others the contents of the string is more important. This can be loosely approximated by stripping the string's quotes, but that returns an incorrect result if the string contains any kind of escape code.
Feature Use Case
I'm writing a PostCSS plugin that processes certain custom at-rules that are followed by quoted strings (for example, @foo "bar"). I need to access the values of those strings.
Feature Proposal
I propose a Quoted.contents getter that returns the semantic contents of the string. For example, for the CSS value "\"" it would return the string '"', and for the CSS value "\61"' it would return the string "a"`.
Reactions are currently unavailable