md-colors
Material Design's colors as SASS variables, extensions, or functions
Install
npm install md-colors# orbower install md-colors
Usage
// declare variables // via Function // via Extension @ @ // No built-in extension for 'box-shadow'. Use a function
Colors
All of md-color
's colors are taken from the Material Design Color Palette.
All names and values are stringified (within functions) and lowercased. For example:
// function // extension/placeholder@@
Importing
You have two options for easy importing:
- Attach
node_modules
orbower_components
to theincludePaths
option of your SASS compiler - Use a sass
importer
function, as described here or as exemplified here
Function
SASS functions can be anywhere as if they were normal variables or values.
The md-color
function takes two parameters:
name
Type: string
The lowercased (and hypened) color name; eg: red
, light-purple
shade
Type: string
Default: 500
The shade or weight of the color; eg: 50
, 300
, a100
Extensions
By nature, extensions, or "placeholders", don't offer too much without inordinate amounts of complexity. So there are only two sets of built-in extensions for background
s and color
s.
If you want a text-color extension, the format is:
%
If you want a background color extension, the format is:
%
For example:
@ @ @ @
Output:
License
MIT © Luke Edwards