dart-sass icon indicating copy to clipboard operation
dart-sass copied to clipboard

support custom URL loaders

Open graingert opened this issue 8 years ago • 6 comments

similar to https://github.com/sass/dart-sass/issues/9 but for:

background-url: url("./path/to/image.png");

graingert avatar Nov 20 '17 16:11 graingert

obviating the need for https://www.npmjs.com/package/resolve-url-loader which currently uses source maps to fix url()s that are relative to the source .scss module but not the compiled .css file.

graingert avatar Nov 20 '17 16:11 graingert

So, for node-sass users, I wrote eyeglass and one of it's main features is an entire solution around exposing assets for installation into an application from source locations in a npm module or application and assigning the right url to them according to application configuration.

https://github.com/sass-eyeglass/eyeglass#working-with-assets

Before Eyeglass, Compass provided this capability in ruby sass.

I think this feature would be a good addition to Sass it would help standardize the implementation of asset helper tools and provide a consistent way for build pipeline integrations to address urls and imports in a holistic way and without forcing authors to opt in to a specific solution in order to interoperate.

chriseppstein avatar Nov 21 '17 01:11 chriseppstein

cc @xzyfer

If we do this, we'd need to do it consistently across implementations.

nex3 avatar Nov 21 '17 01:11 nex3

Agreed.

On 21 Nov. 2017 12:10 pm, "Natalie Weizenbaum" [email protected] wrote:

cc @xzyfer https://github.com/xzyfer

If we do this, we'd need to do it consistently across implementations.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sass/dart-sass/issues/195#issuecomment-345883503, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjZWGS99C6wWlXdW4-SXPcFzJRoskv1ks5s4iLwgaJpZM4Qkggn .

xzyfer avatar Nov 21 '17 02:11 xzyfer

Here's the libsass issue: https://github.com/sass/libsass/issues/532

On 21 Nov 2017 02:38, "Michael Mifsud" [email protected] wrote:

Agreed.

On 21 Nov. 2017 12:10 pm, "Natalie Weizenbaum" [email protected] wrote:

cc @xzyfer https://github.com/xzyfer

If we do this, we'd need to do it consistently across implementations.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sass/dart-sass/issues/195#issuecomment-345883503, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAjZWGS99C6wWlXdW4- SXPcFzJRoskv1ks5s4iLwgaJpZM4Qkggn> .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sass/dart-sass/issues/195#issuecomment-345898461, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZQTKnvJH_KbOC-XlzyRt7fV9bjAhfoks5s4je2gaJpZM4Qkggn .

graingert avatar Nov 21 '17 03:11 graingert

Discussion of the design for this loader should happen at https://github.com/sass/sass/issues/2535. This issue will track the eventual implementation and the Dart API.

nex3 avatar Jul 06 '18 20:07 nex3