0.0.3 • Published 8 years ago
cssgen v0.0.3
CssGen
Simple css spacing library that generates styles
Description
Use this to create spacing css (Padding, margin helpers) from predefined template
Template: (prefix)-(type)-(value)-(in percent? If no just omit that)
Available styles
m - margin
p - padding
Also, it can be combined with one of: t, r, b, l that means top, right, bottom, left respectively
Examples:sp-mt-20-p produces margin-top: 20%;sp-pl-30 produces padding-left: 30px;sp-m-10 produces margin: 20px;
Usage
- Configure
preferences.js
1.1 SetsourcesanddistRootto locate source file (Must have html class structure e.g.class='sp-mt-20-p'orclass="sp-p-10") and build files root
Note: Output file will have same name as source file (Currently works only with 1 source file) and won't ask for overwriting, be carefull)
1.2 Customizesystemblockprefix,percentand indent settings - Run
node generator.jsornpm startoryarn start - Done! File created in your
distRoot. Just include this in yourheadsection
Todos for next release
- Make bulk source generation and
concatenateoptions working - Create live generating of styles on client-side
- Add more templates for style analizyng
- Add more styles to generate
PRs are welcome! :)