All Projects → steobrien → cease

steobrien / cease

Licence: MIT License
Simple, isolated CSS-in-JS for React components

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to cease

Styled Jsx
Full CSS support for JSX without compromises
Stars: ✭ 6,768 (+32128.57%)
Mutual labels:  css-in-js, shadow-dom
Reshadow
Markup and styles that feel right
Stars: ✭ 343 (+1533.33%)
Mutual labels:  css-in-js, shadow-dom
csstips
CSS Tips to help beginners using CSS in TS / JS
Stars: ✭ 50 (+138.1%)
Mutual labels:  css-in-js
stylelint-processor-glamorous
💄 Lint glamorous and related css-in-js with stylelint
Stars: ✭ 18 (-14.29%)
Mutual labels:  css-in-js
veel
Base react styling components using fela with a design system
Stars: ✭ 26 (+23.81%)
Mutual labels:  css-in-js
stitchwind
A bridge between Tailwind and Stitches
Stars: ✭ 33 (+57.14%)
Mutual labels:  css-in-js
ionic-custom-components
🌈 Ionic Tutorial: Mastering Web Components in Ionic Framework. This repo is an Ionic project showcasing Angular custom components and Stencil custom web components.
Stars: ✭ 30 (+42.86%)
Mutual labels:  shadow-dom
mugiwara
fast minimal CSS-in-JS created to reduce size of CSS injected
Stars: ✭ 11 (-47.62%)
Mutual labels:  css-in-js
glory
The world fastest framework agonistic CSS-in-JS library. Available in any frontend framework you use, like React, Vue and Svelte.
Stars: ✭ 20 (-4.76%)
Mutual labels:  css-in-js
scoped
Scoped CSS polyfill
Stars: ✭ 67 (+219.05%)
Mutual labels:  scoped
satchel
The little bag of CSS-in-JS superpowers
Stars: ✭ 14 (-33.33%)
Mutual labels:  css-in-js
smoothie
A deliciously scalable and adaptable stylesheet methodology 🍹
Stars: ✭ 27 (+28.57%)
Mutual labels:  css-in-js
styled-components-docs-zh
💅 styled-components 中文文档翻译 🏇持续施工中
Stars: ✭ 160 (+661.9%)
Mutual labels:  css-in-js
jolvera.dev
Personal blog built with Next.js & Rebass
Stars: ✭ 36 (+71.43%)
Mutual labels:  css-in-js
adonis
Adonis ❤️ Aphrodite
Stars: ✭ 44 (+109.52%)
Mutual labels:  css-in-js
zaftig
~2kB css in js: z`display flex` // .zjsdkk43-1
Stars: ✭ 15 (-28.57%)
Mutual labels:  css-in-js
bredon
A modern CSS value compiler in JavaScript
Stars: ✭ 39 (+85.71%)
Mutual labels:  css-in-js
react-awesome-reveal
React components to add reveal animations using the Intersection Observer API and CSS Animations.
Stars: ✭ 564 (+2585.71%)
Mutual labels:  css-in-js
web-components-tutorial
HTML Web Component using Vanilla JavaScript
Stars: ✭ 38 (+80.95%)
Mutual labels:  shadow-dom
svelte-webcomponents
A ready-to-use project template to build custom elements (web components) with Svelte 3 with support and examples for web components, jest, sass, nested components with props, eslinting, stylelinting, Github actions, propagating custom events from shadow-DOM to real-DOM etc.
Stars: ✭ 22 (+4.76%)
Mutual labels:  shadow-dom

Cease

Simple, isolated CSS-in-JS for React components.

Usage · Highlights · Why? · Documentation



Caution

Cease is currently experimental. It's working well for me so far, but I haven’t used it any serious production app yet, and you should be very careful before doing so. Please give it a try, and open an issue if you find anything broken or unexpected.


Usage

npm install --save cease
import css from "cease"

// define a React component
const Heading = ({ children }) => <h1>{children}</h1>

// apply your stylesheet to it
const Styled = css`
  h1 {
    color: red;
  }
`(Heading)

// use the styled version throughout your app
export default Styled

This component will now be rendered in Shadow DOM, insulating it from other styles in the app.

See more examples in the Guide…

Highlights

  • tiny: 500 bytes, zero dependencies
  • simple: powered by native browser APIs
  • compilation-free: no build step required
  • standard syntax: conventional CSS without gimmicks

Why?

CSS-in-JS is great. However, existing libraries have drawbacks:

  1. Complication. There are many different ways to apply styles to components, leading to a large API surface area (and bugs). Additionally, compilers like Babel and Webpack are often required to run the code.
  2. Lack of isolation. CSS scales best when components don't interfere with each other. Although many libraries promote scoping, edge cases always exist allowing styles to leak.
  3. Performance gotchas. Common usage patterns can impact render latency.

Cease is an experiment to keep things simple by leveraging browser APIs for isolation in concert with standards-compliant CSS. See more about how it works in the Guide.


Documentation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].