String interpolation in @each
See original GitHub issueWhen trying to use Sass’s @each
directive with string interpolation of the loop variables I get an unknown word error.
The following example code:
$sizes: (
"small": 12px,
"large": 14px
);
@each $name, $size in $sizes {
.#{$name} {
font-size: $size;
}
}
results in the following build error:
Module build failed: Unknown word (75:6)
73 |
74 | @each $name, $size in $sizes {
> 75 | .#{$name} {
| ^
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
string interpolation - format string output - Microsoft Learn
An interpolated string is a string literal that might contain interpolation expressions. When an interpolated string is resolved to a result ...
Read more >String interpolation - Wikipedia
In computer programming, string interpolation is the process of evaluating a string literal containing one or more placeholders, yielding a result in which ......
Read more >Java Program to Illustrate String Interpolation - GeeksforGeeks
String Interpolation is a process in which the placeholder characters are replaced with the variables (or strings in this case) which allow ...
Read more >String Interpolation in Java | Baeldung
String interpolation is a straightforward and precise way to inject variable values into a string. It allows users to embed variable references ...
Read more >Python String Interpolation - Programiz
Python 3.6 added new string interpolation method called literal string interpolation and introduced a new literal prefix f . This new way of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@BHouwens use right syntax for
webpack
2Try without quotes.