EXSA Elements — Guarded Classless™ HTML Demo
Guarded Classless™ Elements
Every semantic HTML element below is styled automatically — no classes, no components. Just add class="exsa" to <body>. All selectors use :where() for zero specificity and :not([class]) guards — add any class to any element to opt out instantly. Powered by 82 design tokens in @layer exsa.elements.
Paragraph
Standard paragraph with margin: var(--gap-md) 0 and padding: 0. Multiple paragraphs stack with consistent vertical rhythm.
This is a standard paragraph. EXSA applies consistent vertical rhythm. This one is long enough to wrap and show line-height behavior.
A second paragraph stacks below with the same spacing — no extra classes needed.
Links
Bold, underlined, accent color via --color-link. Visited links use --color-secondary. Hover applies brightness filter.
Here is a normal link — bold, underlined, accent color.
Here is a visited link to test :visited styling.
Small & Mark
<small> renders muted text via --color-text-secondary. <mark> gets subtle padding for visibility. Both guarded with :not([class]).
This is small text — muted secondary color. Often used for captions or legal text.
This sentence contains highlighted text inside a paragraph.
KBD & Abbreviation
<kbd> renders as a keyboard key with mono font, border, and shadow. <abbr> shows dotted underline with help cursor. Both guarded with :not([class]).
Press Ctrl + S to save. Or use ⌘ + S on Mac.
CSS custom properties are the design system. HTML is all you need.
Del & Ins
Editorial marks. <del> renders in danger color, <ins> in success color. Both guarded with :not([class]).
The old price was $29 and the new price is $19.
Cite & Superscript
<cite> renders italic muted. <sup> renders as a pill badge with --color-secondary background. Both guarded.
— The EXSA Philosophy
New featureBETA — superscript renders as a badge. Version 2new released today.
Code
Inline <code> gets accent background and mono font. <pre> blocks get padding, max-width, and overflow auto. <pre><code> combo gets wider padding and pre-wrap.
Inline code: git clone https://github.com/Saif-Almarri/exsa.git and const x = 42;
// Preformatted block — monospace, padded
function greet(name) {
return `Hello, ${name}!`;
}
// Pre > Code block — wider padding, pre-wrap
const tokens = { '--color-link': '#118bee' };
// Change one token — every component recolors.
Lists & Dividers
Unordered and ordered lists with consistent padding. <hr> renders as a 1px divider with 3rem vertical margin.
Unordered
- CSS custom properties are the design system
- @layer enforces cascade order without specificity
- :where() guarantees zero-specificity selectors
Ordered
- Link
exsa.css - Pick a theme
- Add
class="exsa"to<body>
Content below the divider.
Details / Disclosure
Native <details> with bold summary cursor. Nested details get indent + left border pipe for visual hierarchy.
Click to reveal — details/summary are styled
This content is hidden by default. The summary is bold with a cursor pointer.
Advanced configuration
Tokens
Override any of the 80 CSS custom properties in your theme file.
Components
Link individual component CSS files as needed — zero dead styles.
Cards
Auto-detected from <section> + <aside>. Container queries adapt padding at 320px/500px. Full-bleed images via negative margin tied to --card-padding. Horizontal cards auto-detect <img>/<figure>/<video> via :has().
Horizontal Card (auto-detected via :has)
Callout
Auto-detected from <article> > <aside>. Tinted background, start accent, rounded corners, styled <strong> label and <code> chips. RTL-safe with border-inline-start. Recolor via --callout-accent and --callout-bg (defaults: secondary purple).
Table
Bordered table with themed header background (--color-link), cell padding, and rounded corners. display:block enables horizontal scroll on overflow. First column left-aligned via --justify-body.
| Framework | Components | Classless | Build Step | Token-Driven |
|---|---|---|---|---|
| EXSA | 68 | ✅ | None | ✅ 82 tokens |
| Bootstrap | 20+ | ❌ | Optional | ❌ |
| Tailwind | None | ❌ | Required | ❌ |
| Pico CSS | Few | ✅ | None | ❌ |
Form
Card-style wrapper with border and shadow. All inputs, selects, textareas styled automatically. <fieldset> gets border + padding with bold <legend>. :invalid inputs show red border (only after user interaction via :not(:placeholder-shown)). :valid shows green.
Blockquote
Large centered text with optional left border pipe. Border is opt-in via --blockquote-border (default: none). Footer renders in muted color.
"CSS custom properties are the design system. The cascade should enforce the architecture."
"EXSA cut our development time in half. Pure semantic HTML, professional UI."
Dialog
Native <dialog> with backdrop, entry animation, and responsive width. Open via showModal().
Figure with Caption
Centered figure with responsive media and muted caption via --color-text-secondary.
Buttons
Neutral bordered button with hover background change and click scale. Disabled state at 50% opacity with not-allowed cursor. For colored variants (primary, success, danger, etc.), see the Buttons component.
Auto Card Grid
3+ <article> elements in a <section> auto-detect as a responsive card grid. Powered by :has(> article:nth-child(3)). Add any class to any article to opt out.
Ship Faster
Three or more <article> elements in a <section> auto-detect as a responsive card grid.
Zero Classes
No .grid. No .flex. No .card. The framework detects layout intent from structure alone.
Responsive
Cards wrap automatically. Two per row on tablets, one per row on phones.
Opt Out
Add class="anything" to any article and the whole grid steps aside.
Auto Gallery
2+ <figure> elements in a <section> auto-detect as an image gallery grid. Powered by :has(> figure:nth-child(2)).
Auto Stats Row
3+ standalone <p> elements in a <section> auto-detect as a statistics row. Powered by :has(> p:nth-child(3)).
68Components
20Themes
82Tokens
0Build Steps
Auto Hero Split
A <header> inside <main> that contains an image/figure auto-splits into two equal columns. Powered by :has(> img, > figure, > svg, > video). Scoped to main header to avoid conflicting with the Hero component.
Image + Text, Auto-Split
When a header inside main contains an image or figure, EXSA auto-detects it and splits into two equal columns.