I have an example code with .#
.#{$item} {
background: $item;
}
I can't find anything on google apart from another example
$fa-css-prefix: fa;
.#{$fa-css-prefix} { ... }
What does it mean?
There are two parts in this expression,
The . is the css class selector, #{} interpolation syntax it allows the using of the variables in selectors and property names
$name: foo;
$attr: border;
p.#{$name} {
#{$attr}-color: blue;
}
the generated css:
p.foo {
border-color: blue; }
The . Is actually for a classname and not related to the #. #{$name} is to output a variable name in escaped format. I case the variable had characters such as dash sass won't treat it as a subtract.
Here's an example: Using SASS, How can I escape the slash character in a font declaration?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With