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

Closed
4 of 5 tasks
jathak opened this issue Nov 6, 2019 · 3 comments
Closed
4 of 5 tasks

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

jathak opened this issue Nov 6, 2019 · 3 comments
Assignees
Labels
specs written Specs have been written for the feature and at least one implementation passes them

Comments

@jathak
Copy link
Member

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
Copy link
Contributor

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
jathak added a commit to sass/sass-spec that referenced this issue Nov 20, 2019
jathak added a commit to sass/sass-spec that referenced this issue Nov 25, 2019
@nex3
Copy link
Contributor

nex3 commented Nov 27, 2019

Since no one has raised any issues, I'm officially marking this proposal as accepted.

@nex3 nex3 added proposal accepted A full proposal for this feature has been marked accepted specs written Specs have been written for the feature and at least one implementation passes them and removed bug Something isn't working proposal: module system labels Nov 27, 2019
@nex3 nex3 added proposal: module system and removed proposal accepted A full proposal for this feature has been marked accepted labels Jan 16, 2020
@nex3
Copy link
Contributor

nex3 commented Oct 26, 2020

Closing this out because LibSass is now deprecated and we aren't expecting to add any additional features to it.

@nex3 nex3 closed this as completed Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
specs written Specs have been written for the feature and at least one implementation passes them
2 participants