Skip to content

Instantly share code, notes, and snippets.

@storypixel
Created September 2, 2014 15:10
Show Gist options
  • Save storypixel/21ee820022006ce8cf8c to your computer and use it in GitHub Desktop.
Save storypixel/21ee820022006ce8cf8c to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// Bourbon (v4.0.2)
// Neat (v1.6.0)
// ----
@import "bourbon/bourbon";
@import "neat/neat";
// Test one
$names: (
ricky: #4e9bac,
bobby: #248cff
);
@each $name, $color in $names {
.test-#{$name} {
color: #{$color};
}
}
// Test two
$_color-base-grey: rgb(229,231,234);
@function palette($palette, $tone: 'base') {
@return map-get(map-get($palettes, $palette), $tone);
}
$palettes: (
purple: (
base: rgb(42,40,80) /* #{purple} */,
light: rgb(51,46,140),
dark: rgb(40,38,65)
),
grey: (
base: $_color-base-grey,
light: lighten($_color-base-grey, 10%),
dark: darken($_color-base-grey, 10%)
)
);
a {
color: palette(purple);
&:hover {
color: palette(purple, light);
}
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.test-ricky {
color: #4e9bac;
}
.test-bobby {
color: #248cff;
}
a {
color: #2a2850;
}
a:hover {
color: #332e8c;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment