Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

seed-color-fn

0.1.1 • Public • Published

seed-color-fn Build Status npm version Dependencies

Color function pack for Seed!

Install

npm install seed-color-fn --save-dev

Basic Usage

SCSS

This seed pack needs to be imported into your sass pipeline. Below is an example using Gulp:

var gulp = require('gulp');
var sass = require('gulp-sass');
var pack = require('seed-color-fn');
 
gulp.task('sass', function () {
  return gulp.src('./sass/**/*.scss')
    .pipe(sass({
      includePaths: pack
    }))
    .pipe(gulp.dest('./css'));
});

Once that is setup, simply @import seed-color-fn as needed in your .scss file:

// Packs
@import "pack/seed-color-fn/_index";

Usage

Adding colors

Add colors to the global color scheme by using the _color mixin:

// My awesome custom color scheme
$my-colors: (
  red: red,
  blue: blue
);
 
// Add my colors to the global color scheme
@include _color($my-colors);

Using colors

After you've successfully added/defined colors in your color scheme, use the _color function to use the color:

.my-class {
  color: _color(red);
}

Install

npm i seed-color-fn

DownloadsWeekly Downloads

1

Version

0.1.1

License

MIT

Last publish

Collaborators

  • avatar