Skip to content

Instantly share code, notes, and snippets.

@kopepasah
Last active October 19, 2017 17:10
Show Gist options
  • Save kopepasah/b9888d82737e539f2247df8e5f94fce4 to your computer and use it in GitHub Desktop.
Save kopepasah/b9888d82737e539f2247df8e5f94fce4 to your computer and use it in GitHub Desktop.
Example code for the case to always use quotes in Sass maps.
$colors: (
"blue": "#2b55f3",
"green": "#39dd4a",
"yellow": "#f0f30f",
"red": "#ff2e35",
"orange": "#f8ad55",
);
@each $name, $color in $colors {
.#{$name} {
color: $color;
}
}
$colors: (
blue: "#2b55f3",
green: "#39dd4a",
yellow: "#f0f30f",
red: "#ff2e35",
orange: "#f8ad55",
);
@each $name, $color in $colors {
.#{$name} {
color: $color;
}
}
.blue{color:"#2b55f3"}.green{color:"#39dd4a"}.yellow{color:"#f0f30f"}.red{color:"#ff2e35"}.orange{color:"#f8ad55"}
Invalid CSS after ".": expected class name, was "#ff0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment