Skip to content

Instantly share code, notes, and snippets.

@SanderElias
Created November 12, 2014 07:30
Show Gist options
  • Save SanderElias/b06e787e90df2558d1eb to your computer and use it in GitHub Desktop.
Save SanderElias/b06e787e90df2558d1eb to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// libsass (v3.0.1)
// ----
$color-amber: (
'50': #fff8e1,
'100': #ffecb3,
'200': #ffe082,
'300': #ffd54f,
'400': #ffca28,
'500': #ffc107,
'600': #ffb300,
'700': #ffa000,
'800': #ff8f00,
'900': #ff6f00,
'A100': #ffe57f,
'A200': #ffd740,
'A400': #ffc400,
'A700': #ffab00
);
$theme-name: 'amber';
$primary-color-palette: $color-amber;
.md-available-colors-#{$theme-name} {
& .colorNames {
content: map-keys($primary-color-palette) ;
}
& .colorNamesinError {
content: "#{map-keys($primary-color-palette)}" ;
}
& .colorValues {
content: "#{map-values($primary-color-palette)}";
}
}
.md-available-colors-amber .colorNames {
content: '50', '100', '200', '300', '400', '500', '600', '700', '800', '900', 'A100', 'A200', 'A400', 'A700'; }
.md-available-colors-amber .colorNamesinError {
content: "5','10','20','30','40','50','60','70','80','90','A10','A20','A40','A700"; }
.md-available-colors-amber .colorValues {
content: "#fff8e1, #ffecb3, #ffe082, #ffd54f, #ffca28, #ffc107, #ffb300, #ffa000, #ff8f00, #ff6f00, #ffe57f, #ffd740, #ffc400, #ffab00"; }
@SanderElias
Copy link
Author

There seems to be an problem with Libsass 3.0.1 and the map-keys function.
Have a close look at the difference between & .colorNames { content and & .colorNamesinError { content.

with sass 3.4.x it seems to work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment