Skip to content
Import and export configurable CSS packages using npm
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
core
dist
fixtures
src
.babelrc
.editorconfig
.eslintrc
.gitignore
.npmignore
.prettierrc
.rollup.js
.stylelintrc
.travis.yml
CHANGELOG.md
LICENSE
README.md
package-lock.json
package.json
syntax-sample.css

README.md

Kolache

Build Status

Import and distribute configurable CSS packages via npm.

Full documentation at kolache.keithjgrant.com.

/* main.css */
@import 'button' as .button;
@import 'button:variant' as .button--danger {
  $color: red;
}

/* button.css */
@export {
  $(name) {
    display: inline-block;
    padding: 0.5em;
    border: 1px solid blue;
    background-color: blue;
  }
}

@export as 'variant' {
  $(name) {
    border-color: $color;
    color: $color;
  }
}

Compiles to:

.button {
  display: inline-block;
  padding: 0.5em;
  border: 1px solid blue;
  background-color: blue;
}

.button--danger {
  border-color: red;
  color: red;
}

Usage

postcss([require('kolache')]);

See PostCSS docs for examples for your environment.

You can’t perform that action at this time.