You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The way Sass currently handles plain-CSS @imports is different than the way it handles other plain-CSS at-rules, in a few ways. Once we get rid of dynamic Sass @imports (#3513), we'll want to start treating plain-CSS @imports the same as any at-rule, which means removing these custom behaviors.
The specific behaviors at issue are:
Sass allows multiple comma-separated URLs associated with a single @import, as in @import "foo.css", "bar.css".
Sass handles interpolation in the imported URLs as though they were strings, which is different than how it handles interpolation for all other at-rules. For example, @import url("#{'"'}") currently produces @import url('"') and @import url("#{'\a'}") currently produces @import url("\a"). For other at-rules these produce @foo url(""") and @foo url(" "), respectively. Note that this specifically only occurs for a url() (the only context in which interpolation is allowed in a static import) that contains a quoted string.
The first difference can be detected at parse-time. We don't want to emit deprecations for every interpolation in a static import, so for the second we'll have to detect interpolations that specifically contain characters that have semantically different handling for string-style interpolation, which are quotes, backslashes, carriage returns, line feeds, and null characters. Fortunately, these are generally unlikely to be present in actually-imported URLs, so this shouldn't cause too much user pain.
The text was updated successfully, but these errors were encountered:
The way Sass currently handles plain-CSS
@import
s is different than the way it handles other plain-CSS at-rules, in a few ways. Once we get rid of dynamic Sass@import
s (#3513), we'll want to start treating plain-CSS@import
s the same as any at-rule, which means removing these custom behaviors.The specific behaviors at issue are:
@import
, as in@import "foo.css", "bar.css"
.@import url("#{'"'}")
currently produces@import url('"')
and@import url("#{'\a'}")
currently produces@import url("\a")
. For other at-rules these produce@foo url(""")
and@foo url(" ")
, respectively. Note that this specifically only occurs for aurl()
(the only context in which interpolation is allowed in a static import) that contains a quoted string.The first difference can be detected at parse-time. We don't want to emit deprecations for every interpolation in a static import, so for the second we'll have to detect interpolations that specifically contain characters that have semantically different handling for string-style interpolation, which are quotes, backslashes, carriage returns, line feeds, and null characters. Fortunately, these are generally unlikely to be present in actually-imported URLs, so this shouldn't cause too much user pain.
The text was updated successfully, but these errors were encountered: