o-
v0.8.0
Published
A collection of functions, mixins, and placeholders for sass
Downloads
23
Readme
o-
pronounced "Oh Dash"
A collection of functions, mixins, and placeholders for sass
Install
via npm
npm install o- --save-dev
or through bower
bower install o-dash --save
Usage
Import o- into your sass/scss
@import 'node_modules/o-';
As of node-sass >= v3.0.0, js functions can be registered at
configuration time, which is needed for o-md-color
and o-closest-md-color
functions. You will need node-sass, gulp-sass,
or grunt-sass depending on your build setup.
Grunt:
// ...
sass: {
options: {
functions: require('o-')
},
build: {
files: {
'style.css': 'style.scss'
}
}
}
// ...
Gulp:
// ...
gulp.task('sass', () => {
return gulp.src('style.scss')
.pipe(sass({
functions: require('o-')
}))
.pipe(gulp.src('style.css'))
})
// ...
Node:
// ...
sass.render({
data: `
body {
color: o-closest-md-color(o-random-color())
}
`,
functions: require('o-')
}, (err, result) => {/*...*/})
// ...
API
You can refer to the documentation online at lokua.github.io/o-, or internally by opening doc/index.html.
Dev
NODE_ENV=development && npm install
If adding a new file, run npm run gen
afterword to repopulate the lib/_index.scss
imports file.
Documentation is generated with the much awesome sassdoc. npm run doc