effcss

0

Описание

Self-confident CSS-in-JS

https://effnd.tech/css/

Языки

  • TypeScript99,7%
  • JavaScript0,3%
3 дня назад
3 дня назад
месяц назад
месяц назад
9 месяцев назад
месяц назад
5 месяцев назад
4 месяца назад
README.md

effcss

EffCSS

license npm latest package minified size minzipped size install size

EffCSS is a self-confident CSS-in-JS library based only on the browser APIs. Use the full power of JS and TS to create styles.

Some features

  • zero-dependency,
  • framework agnostic,
  • selectors isolation and minification out of the box,
  • flexible stylesheets types that can suggest available selectors (BEM and Atomic CSS compatible),
  • compatible with any rendering (CSR, SSR, SSG).

Devtools

Examples

Installation

Type in your terminal:

Quick start

Just call

useStyleProvider
in your code:

main.js

Each CSS stylesheet corresponds to a single

Stylesheet maker
.
Stylesheet maker
is a JS function that should return object or string with style rules:

maker.ts

To use

Stylesheet maker
just pass it to
cx
(creates classnames string) or
dx
(creates data attributes object) methods of
Style provider
:

App.tsx

That's all. Enjoy simplicity.