Skip to content

mvujovic/node-bourbon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bourbon Sass Mixin Library

This is a node-sass port of the Bourbon library. If you are looking for the original Ruby/Rails version, you can find it here.

A simple and lightweight mixin library for Sass

Bourbon is a comprehensive library of sass mixins that are designed to be simple and easy to use. No configuration required. The mixins aim to be as vanilla as possible, meaning they should be as close to the original CSS syntax as possible.

The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties. Bourbon uses SCSS syntax.

##Bourbon Documentation & Demo

Requirements

Installation

To install as a development dependency, run:

npm install --save-dev node-bourbon

If you need it for production, replace --save-dev with --save.

Usage

The includePaths property returns an array of paths for use in node-sass' includePaths option.

var bourbon = require('node-bourbon').includePaths;

You can then use this array in your options:

var sass    = require('node-sass')
  , bourbon = require('node-bourbon').includePaths;

var paths = ['other/path', 'another/path'].concat(bourbon);

sass.render({
  file: './application.scss',
  success: function(css){
    console.log(css);
  },
  error: function(error) {
    console.log(error);
  },
  includePaths: paths,
  outputStyle: 'compressed'
});

Grunt Usage

Using the grunt-sass task:

grunt.initConfig({
  sass: {
    dist: {
      options: {
        includePaths: require('bourbon').includePaths,
        outputStyle: 'compressed'
      },
      files: {
        'path/to/output.css': 'path/to/input.scss'
      }
    }
  }
});

Import Bourbon at the beginning of your main scss file. All additional stylesheets must be imported below Bourbon:

@import "bourbon";
@import "other/scss/partial";


Credits

This node-sass port is maintained by Michael LaCroix, however all credits for the Bourbon library go to thoughtbot, inc:

thoughtbot

Bourbon is maintained and funded by thoughtbot, inc

The names and logos for thoughtbot are trademarks of thoughtbot, inc.

Got questions? Need help? Tweet at @phillapier.

License

node-bourbon is Copyright © 2013 Michael LaCroix. It is free software, and may be redistributed under the terms specified in the LICENSE file.

About

A node-sass port of Bourbon.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CSS 90.3%
  • JavaScript 9.7%