Open vaadin-bot opened 8 years ago
Originally by rsmeds
The sass compiler does not seem to understand sass string interpolation #{$foo} in a parameterized selector like :nth-child(bar).
Example code (that works e.g. in CodePen, but not with vaadin sass compiler) :
$var:1; span:nth-child(#{$var}) { // whatever styles }
There is an awkward workaround that involves building the entire nth-child selector as a variable, and interpolating that as a whole:
$var: 1; $selector: "nth-child(#{$var})"; span:#{$selector} { // whatever }
Imported from https://dev.vaadin.com/ issue #19722
Originally by rsmeds
The sass compiler does not seem to understand sass string interpolation #{$foo} in a parameterized selector like :nth-child(bar).
Example code (that works e.g. in CodePen, but not with vaadin sass compiler) :
There is an awkward workaround that involves building the entire nth-child selector as a variable, and interpolating that as a whole:
Imported from https://dev.vaadin.com/ issue #19722