$colors: (
primary: blue,
danger: red
);
@each $name, $color in $colors {
.text-#{$name} {
color: $color;
}
}
Although, rarely used in such a simple example.
Moving away from Tailwind, and learning to structure my CSS
5 months ago by codeinabox to c/css
go to feed...
go to feed...
Good to see this kind of articles. Nowadays there are no real reasons anymore for CSS preprocessors.
save