Grid
Rows and columns at once.
How boxes are placed, and how text is set: in any direction, in any script, in any colour space.
The cards share their parent's rows through subgrid: titles, texts and
footers line up across cards, whatever their length.
Rows and columns at once.
Children take part in their grandparent's tracks, so siblings align.
One dimension, distributing space along a line, wrapping when it must, and centring at last.
The cards query their container's width, not the window's. Make it narrower:
Two dimensions, named areas, and gaps.
Components that adapt to where they are.
A selected card is outlined, by a parent selector.
The quote is styled with margin-inline-start,
border-inline-start and padding-inline: switched to a
right-to-left direction, it mirrors itself.
Style the start and the end, not the left and the right, and the layout follows the language.
التخطيط يتبع اتجاه اللغة.
writing-mode: vertical-rl, with ruby for readings and upright numbers
(text-combine-upright).
日本語は縦にも横にも書けます。ウェブでも、 書字方向を変えるだけで、右から左へ行が進む縦組みになります。
令和8年10月9日、 富士山の高さは3776メートルです。
text-wrap: balanceA long paragraph clamped to three lines: it goes on to say more than fits, about how browsers lay out text, measure lines, and add an ellipsis where the last line is cut, which this sentence demonstrates by being far too long for the space it has.
line-clamp: 31,111.118,888.88
1,111.118,888.88
font-variant-numeric: tabular-numsInitial letters lift the start of a paragraph, as books have done for centuries; the browser sizes and sinks them to fit the lines.
initial-letter
OKLCH keeps lightness even across hues; color-mix() blends in a chosen
space; light-dark() picks per colour scheme.