# cssgen

> Simple css spacing library that generates styles

Latest version **0.0.3** (published 2017-05-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install cssgen
pnpm add cssgen
yarn add cssgen
bun add cssgen
```

Provides the command `cssgen`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2017-05-26 |
| First published | 2017-05-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Xahon |
| Maintainers | xahon |

## Links

- npm: https://www.npmjs.com/package/cssgen
- Repository: https://github.com/xahon/CssGen
- Homepage: https://github.com/xahon/CssGen#readme
- Issues: https://github.com/xahon/CssGen/issues
- npm.io page: https://npm.io/package/cssgen

## Dependencies (5)

- [fs](https://npm.io/package/fs.md) ^0.0.1-security
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [n-readlines](https://npm.io/package/n-readlines.md) ^0.2.7
- [eslint-plugin-node](https://npm.io/package/eslint-plugin-node.md) ^4.2.2
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ^2.3.0

## Recent versions

- 0.0.3 (latest) — 2017-05-26
- 0.0.2 — 2017-05-26
- 0.0.1 — 2017-05-26

## 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  
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! :)

---
_Source: https://npm.io/package/cssgen · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
