angryobject / funss

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FunSS

Automatically generate CSS from class name convensions on runtime

This is just an experiment.

See the demo.

Install

yarn add funss
# or
npm i -S funss

Usage

import funss from 'funss';

const ss = funss();

// parse all current class names
ss.parse(document.body);

// observe changes to DOM and automatically add new classes (via MutationObserver)
ss.observe(document.body);

//or add class names manually
ss.addClassName('mt20 p10');

About

License:MIT License


Languages

Language:JavaScript 100.0%