0.0.3 • Published 7 years ago

cssgen v0.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

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

  1. Configure preferences.js
    1.1 Set sources and distRoot to locate source file (Must have html class structure e.g. class='sp-mt-20-p' or class="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 Customize system block prefix, percent and indent settings
  2. Run node generator.js or npm start or yarn start
  3. Done! File created in your distRoot. Just include this in your head 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! :)