Skip to content

Instantly share code, notes, and snippets.

@lubkoKuzenko
Last active June 29, 2018 08:15
Show Gist options
  • Save lubkoKuzenko/7fecb9e9ce5e042933252ce2d08fbe70 to your computer and use it in GitHub Desktop.
Save lubkoKuzenko/7fecb9e9ce5e042933252ce2d08fbe70 to your computer and use it in GitHub Desktop.
Usage: color: pallette(white, base);
// pallette
// this code should be in variables file
$palettes: (
white: (
base: #FFFFFF,
off: #EDEEEF,
),
black: (
base: $base-black,
text: #2C3E50,
light: #4C4E56,
)
);
// @see https://twitter.com/thecodezombie/status/595977653296996354/photo/1
@function palette($palette, $tone: 'base') {
@return map-get(map-get($palettes, $palette), $tone);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment