Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variables behind a @forward aren't configurable through an @import #2772

Open
jathak opened this issue Nov 6, 2019 · 1 comment
Assignees

Comments

@jathak
Copy link
Member

@jathak jathak commented Nov 6, 2019


If a library like the following:

// _library.scss (original)
$lib-color: red !default;
a { color: $lib-color; }

removes the lib- prefix when migrating to the module system, it will add an import-only stylesheet like so to preserve the manually prefixed names for downstream users still using @import.

// _library.scss (migrated)
$color: red !default;
a { color: $color; }

// _library.import.scss
@forward "library" as lib-*;

But this currently breaks downstream stylesheets like:

// downstream.scss
$lib-color: green;
@import "library";

which compiled to a { color: green; } prior to migration and a {color: red; } after.

It seems like this is due to @import-style configuration not propagating through a @forward.

@nex3

This comment has been minimized.

Copy link
Contributor

@nex3 nex3 commented Nov 13, 2019

The proposal has landed! Since it's narrowly scoped and blocking work on migrating existing libraries, I'm going to limit the call for comments to one week unless any major issues get raised.

jathak added a commit to sass/sass-spec that referenced this issue Nov 18, 2019
See sass/sass#2772

[skip dart-sass]
jathak added a commit to sass/sass-spec that referenced this issue Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.