Skip to content

basarat/easy-style

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

easy-style

A convenient wrapper around free-style. It removes the need to create style sheets and insert them into the page. It does this for you automatically by lazily creating sheets when required and inserting them into the page asynchronously on the next frame render. And because most components will define all their styles before the first frame renders you will probably end up with just one <style/> node for your whole app.

Installation

npm install easy-style

then in your app:

import {style,rule,keyframe} from 'easy-style'

API

style(object)

Calls freeStyle.registerStyle. Returns a className.

rule(query, object)

Calls freeStyle.registerRule. Returns a className.

keyframe(object)

Calls freeStyle.registerKeyframes. Returns an animation name.

About

A convenience wrapper for free-style

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 47.5%
  • JavaScript 46.6%
  • Makefile 5.9%