Sierra guide / Around Sierra
Styling with @frontierjs/css
@frontierjs/css is the styling language: plain CSS, no build step. You style with a tone (danger) and a treatment (outlined), never a color, and a theme is one class on an ancestor. Import it once with import '@frontierjs/css' in src/main.js.
<body class="theme-default">
<button class="btn danger outlined">Delete</button>
<article class="card raised success">Paid</article>
</body>
What else it can do
- There are three kinds of class: an element (
btn,card), a treatment that composes onto anything, and anatomy that nests inside an element - Seven tones work on every element that takes one:
primary,secondary,muted,info,success,warning,danger - Treatments such as
raised,outlined,ghostandglasschain freely - A theme class nests, so a
theme-midnightheader can sit inside atheme-defaultpage THEMESfrom@frontierjs/css/themes.jsgives each theme's label, blurb andlightordarkscheme for a picker- Text and fill contrast are derived from the tone, so there is no text color to pick
- UnoCSS is an opt-in layer: run it beside the package for one-off adjustments, with its reset imported into a CSS layer
- A theme sets tokens and ships no selector of its own
In depth: css README § The idea, § Tones, § Themes, § Using it with UnoCSS