cssgen
v0.0.3
Published
Simple css spacing library that generates styles
Downloads
4
Readme
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 Setsources
anddistRoot
to 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 Customizesystem
blockprefix
,percent
and indent settings - Run
node generator.js
ornpm start
oryarn start
- Done! File created in your
distRoot
. Just include this in yourhead
section
Todos for next release
- [ ] Make bulk source generation and
concatenate
options working - [ ] Create live generating of styles on client-side
- [ ] Add more templates for style analizyng
- [ ] Add more styles to generate
PRs are welcome! :)