Children fill
@children ;
@slot blocks fill slots by name, and a slot name the panel doesn't have is an error.
A small layout language that compiles to
one static HTML file . Structure starts with
@ , everything else is content.
@el stacks its children in a column and
@row lays them out side by side.
spacing is the gap between children.
flex-direction row makes any column a row, also from a width up (
md:flex-direction row ), and the children's
width fill follows it.
Lines without an
@ are text. Braces put elements inside a line:
bold ,
italic ,
important , H
2 O,
highlighted ,
a link , and
Ctrl+K .
A backslash escapes: @ at the start of a line, $price, and {braces}.
Layout is code. Style is code. Everything should compose. — Anonymous
Besides the layout attributes, every attribute is a CSS property with its CSS name and value. A bare number in a length, shadows included, is pixels, and \, keeps a comma in a value. A custom property (--name) is one too: set on an element, it holds for everything inside it. Prefixes stack, and one prefix before a [group] applies to each style in it. A selector prefix is a CSS pseudo-class or pseudo-element under its own name: hover:, first-child:, nth-child(odd):, has(...):, marker:. An element prefix styles every such element inside, at any depth: the table in chapter 6 pads all its cells with
@td:padding 8 .
Colour maths is CSS too, so a variant follows its token wherever it is redefined:
Functions are
@let @name with a body. Their parameters are listed and passed like attributes, a name alone passes true, and a body can be text like this one.
A call works wherever an element does, even inside a sentence: press Ctrl K to search.
Children fill
@children ;
@slot blocks fill slots by name, and a slot name the panel doesn't have is an error.
$name inserts a value and ${...} any expression: HTMLANG has 7 letters and 3 tags.
| # | Name | Role | Status |
|---|---|---|---|
| 1 | Ada | Engineering | Active |
| 2 | Grace | Design, research | Active |
| 3 | Linus | Operations | Away |
Every other element has its HTML name, and HTML attributes are written
key=value .
@page is the root element: its styles go on
<body> , a column that fills the window, and its
key=value attributes on
<html> , like this page's
lang=en .
Flexbox and grid CSS in one
<style> , and no JavaScript.