Skip to content

Overview

LentyStyle is a compilation system that turns .luis source files into standard CSS. Depending on the use case, it runs through browser runtime, hybrid, or SSR flow.


.luis is a source layer on top of CSS. You define variables, loops, conditions, functions, and observed selectors; the output is always standard CSS.


  1. Source is read
  2. The compiler runs
  3. Output is sent into the right flow

Flows:

  • Direct CSS compilation in the browser
  • Pre-generating page styles with Hybrid
  • Injecting CSS at request time with SSR

Observe continues to work the same way across all flows.


<link rel="stylesheet" href="./styles.luis" data-luis>
<script src="/assets/lentystyle.min.js"></script>

In this flow LentyStyle:

  • Finds .luis sources added to the page via the data-luis attribute or .luis extension
  • Compiles them
  • Writes the resulting CSS to the page

If you want to produce styles in the browser at runtime:

Terminal window
pnpm add @lentystyle/core

Use @lentystyle/core/runtime. It compiles the luis content you add and writes it as CSS to the page.