-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add parens around negated variable when namespaced (#115)
Fixes #114. In fixing this, I also found a fixed a bug when migrating removed color functions, as a patch to namespace the argument would be applied before the patch adding the new argument name. This was fixed by ensuring the arguments of a function expression are visited after the function itself is patched.
- Loading branch information
Showing
4 changed files
with
53 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<==> arguments | ||
--migrate-deps | ||
|
||
<==> input/entrypoint.scss | ||
@import "library"; | ||
a { | ||
b: -$amount; | ||
color: darken($color, $amount); | ||
background: darken($color, fn()); | ||
} | ||
|
||
<==> input/_library.scss | ||
$color: blue; | ||
$amount: 10%; | ||
|
||
<==> output/entrypoint.scss | ||
@use "sass:color"; | ||
@use "library"; | ||
a { | ||
b: -(library.$amount); | ||
color: color.adjust(library.$color, $lightness: -(library.$amount)); | ||
background: color.adjust(library.$color, $lightness: -(fn())); | ||
} |