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 "host" portion is lowercased when the url contains "://".
I am migrating a large codebase from RubySass to DartSass, and we used :// in all our importers. The "host" portion of the url is case-sensitive due to our internal logic which resolves the custom imports.
My importers' canonicalize methods are now being called with the lowercased strings, and I have zero visibility to get to the originals. Is there any way to get those strings into my canonicalize and load methods? Alternatively, is there a way I could pre-parse the sass input and remove the // from the urls?
The text was updated successfully, but these errors were encountered:
“The host string is case-insensitive. The returned host name is canonicalized to lower-case with upper-case percent-escapes.”
But note that JavaScript does the same thing when you provide a "valid" scheme like http.
newURL('http://Foo/bar').host// -> 'foo' (lowercase), not 'Foo'
Even if you canonicalize your URL from host to Host within canonicalize(), it will be lower-cased again by the time it reaches load(). So as a workaround, if you know exactly how to transform a lowercase host into the uppercase version, you must do the mapping in load().
The sass compiler doesn't have any kinds of "precompilation hooks", but you can use postcss to write all your files into a temp directory before compiling them with Sass.
Repro:
Expected:
Name/Path
Actual:
name/Path
This appears to be a Dart language feature:
The "host" portion is lowercased when the url contains
"://"
.I am migrating a large codebase from RubySass to DartSass, and we used
://
in all our importers. The "host" portion of the url is case-sensitive due to our internal logic which resolves the custom imports.My importers'
canonicalize
methods are now being called with the lowercased strings, and I have zero visibility to get to the originals. Is there any way to get those strings into mycanonicalize
andload
methods? Alternatively, is there a way I could pre-parse the sass input and remove the//
from the urls?The text was updated successfully, but these errors were encountered: