Using Stylify CSS in browser

Stylify can be used directly in the browser using CDN or imported as a module.

Integration example for browser can be found in integrations examples repository .
<script src=""></script>

    // Optional
    // If is dev environment
    dev: false,
    // Time in ms to reduce the amount of compilations when something changes
    repaintTimeout: 100,
    compiler: {
        variables: {},
        components: {},
        screens: {},
        macros: {}
        // ...

With modules (config is the same as above):

import { Runtime } from '';

new Runtime({ /* Optional config */});


To hide elements that have not been processed yet, you can use the s-cloak class. This class is removed right after the element is processed by Stylify.

It can "help" to prevent layout shifts, implement some sort of loading screen or placeholder and hide page without

    .s-cloak {
        visibility: hidden;
        content-visibility: hidden;
<div class="color:blue s-cloak">Text</div>

To achieve compatibility with reactive frameworks like React or Vue, there is a dom event triggered every time the s-cloak is removed. The argument is the processed element.

document.addEventListener('stylify:uncloak', (event) => {
    // Do something

Where to go next?