Skip to content

jlam55555/color-layer-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Color Layer Generator

A Sass partial to generate background color "layers" as CSS classes

Span of 8-color basis


Simply add a CSS class to add a background-color. Not efficient (layering elements with JS is better for large sets of colors), but for small sets (colors < 7) this might come in handy!

Note that this is not really built for performance, but just to make layering background colors easily simply by adding CSS classes. This was inspired by this Stack Overflow question.

Usage:

@import 'path/to/_clg'
@include gen-layers($params)

Where @params is a list of the format:

$params: (
  '[class_name]': ([R], [G], [B], [A]),
  ...
)

See ./examples for a worked example.

About

A Sass partial to generate background color "layers" as CSS classes

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages