Skip to content

jas-chen/jsty

Repository files navigation

Jsty

Fast and tiny CSS in JS library

npm Build Status Coverage Status gzip size Dependencies

Features

  • No dependency, super tiny (~2.5 KB gzipped)
  • Framework agnostic
  • Universal rendering
  • No custom AST transform or module loader needed
  • Atomic style CSS
  • Inserts only critical styles into stylesheet (both server side and client side)
  • No JavaScript object parsing
  • No JavaScript object hashing
  • Adaptive CSS prefixer that detects browser CSS support and then prefixs styles lazily and properly. It prefixes not only CSS properties and values but also CSS pseudo-classes/elements such as :fullscreen, ::placeholder
  • Class names and prefix results are cached
  • Flexibility. Don't need the prefixer? You can remove it or replace it with your own choice

Development Experience

Code completion (via TypeScript declaration files)

Code completion

CSS Hints

Console warning

Installation

yarn add jsty

Browser Support

IE >= 9

Old flexbox syntax is not supported by the built-in prefixer.

Inspirations