Closed septs closed 1 year ago
i want use sass function, improve developer experience
port resources series api into sass compiler, simplify use image file steps
port resources series api into sass compiler, simplify use image file steps
Next Hugo allows you pass the URL of these image resources as variables to Dart Sass. How is your suggested approach better? To me it sounds
Execute
Note, that I don't mind adding a "functions API" to this library as long as someone could
.example {
--use-file-with-function: resources-get(file-path); // intuitive
// vs
--use-file-with-variable: $injected-file-name; // define separation
}
resources-get(file-path)
: needs Hugo to work, designer needs to understand Hugo's API, will cost one RPC invocation, is hard to reason about re cache busting.$injected-file-name
: can be defined by Hugo or a stylesheet, is easy to reason about re. cache busting
Allow hugo define hugo-specific built-in sass functions
Improve development experience (simplify reference resource files)
Replaced by https://github.com/bep/golibsass/issues/7
https://github.com/bep/godartsass/blob/9f9f1c1aeb19fa45147bf1ca123e73a8dec85e66/internal/embeddedsass/embedded_sass.proto#L537-L568
https://github.com/bep/godartsass/blob/9f9f1c1aeb19fa45147bf1ca123e73a8dec85e66/internal/embeddedsass/embedded_sass.proto#L220-L239