Slite style
This module exposes the postcss sources and build versions of the Slite clients shared style.
Install
npm i -S @slite/style
Using build versions
If you don't want to mess with the postcss config and rely on pure CSS versions, you can simply import the files from the dist
folder:
import 'style/dist/index.css'
import 'style/dist/variables.css'
Using sources
It requires a bit more setup but it's possible to use the source version of the files. There are a few steps:
1 - install our postcss dependencies (if you don't use them already)
yarn add -D postcss-cssnext postcss-import
2 - make sure to use them by adding the following to your postcss.config.js:
module.exports = {
plugins: [
require('postcss-import')({
path: ['node-modules', 'node_modules/@slite/style/src'],
}),
require('postcss-cssnext')(),
]
}
3 - import in your js or post css files:
import '@slite/style'
import '@slite/style/src/variables.css'
in post css:
@import "variables";
Contributing
Build
You can either run the build
or dev
commands. build
will do a production build (only once + minified) while dev
will not minify and also stay in watch mode.
Publishing
Please only use yarn to publish. It'll build automatically and ask you for a version bump.