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

Handle case where configuration variable has already been patched #35

Open
jathak opened this issue Apr 26, 2019 · 2 comments
Open

Handle case where configuration variable has already been patched #35

jathak opened this issue Apr 26, 2019 · 2 comments
Labels
bug Something isn't working module system Part of the module system migrator

Comments

@jathak
Copy link
Member

jathak commented Apr 26, 2019

Right now something like:

// entrypoint.scss
$background: mix(red, blue)
@import "library";

// _library.scss
$background: green !default;

would error, since the patch to add the color namespace and the patch to delete the configuration variable would conflict.

We should handle this case by removing the existing patches and instead applying them to the configuration, e.g:

@use "sass:color";
@use "library" with ($background: color.mix(red, blue));
@nex3
Copy link
Contributor

nex3 commented Apr 27, 2019

In the first example, is $background: green supposed to have a !default flag?

@jathak
Copy link
Member Author

jathak commented Apr 29, 2019

Yes. Fixed.

@jathak jathak added bug Something isn't working module system Part of the module system migrator labels Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module system Part of the module system migrator
Projects
None yet
Development

No branches or pull requests

2 participants