A CSS-In-JS module that's been made as simple as we probably wanted
A feature-rich CSS-in-JS module, with minimal overhead, designed for better developer experience, granularity and simplicity.
'csstype'
module which is only a typedef package that does not affect bundle sizes at all.npm i -S stylight
This will provide stylight
core package with plugins included, e.g. stylight/react
<!-- core package -->
<script type="text/javascript" src="https://unpkg.com/[email protected]/umd/stylight.min.js"></script>
<!-- will provide Stylight UMD global -->
<!-- React plugin -->
<script type="text/javascript" src="https://unpkg.com/[email protected]/umd/stylight.react.min.js"></script>
<!-- will provide StylightReact UMD global -->
There are two conditional requirements for this package to use.
Typescript
>= 4.1
must be used by default for TS server in case of using type completion. A package relies on Template Literal Types feature introduced in this version, so earlier versions of Typescript will most likely cause problems. However, for Javascript projects without type completion and type checks both in a project and IDE, no Typescript version requirements are applied.React
, versions 16
and higher are considered supported since no tests for lower versions has been done. A package relies on React as an optional dependency only, in case React is actually used in a host projectThis product is being distributed for free and without any warranty. Copying, redistribution and modification of this code are not subjects to regulations, but including original links to initial version of this product within any redistribution is highly appreciated.