I'm trying to cleanup some of my styles for a Rails 4.1 app. Instead of listing out every color and it's variations, I would like to create a mapping of colors/values and then generate the CSS by iterating over it.
# colors.css.scss
$colors: (
"red": #330000,
"blue": #003300
);
However, I get the following error from this:
Invalid CSS after "$colors: (red": expected ")", was ": #330000, blue..."
I can use Sass variables and mixins just fine; why can't I use SASS mappings as well?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…