Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
erat, sed diam voluptua. At vero eos et accusam et justo duo dolores
et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est
Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur
sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore
et dolore magna aliquyam erat, sed diam voluptua. At vero eos et
accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
no sea takimata sanctus est Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
erat, sed diam voluptua. At vero eos et accusam et justo duo dolores
et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est
Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur
sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore
et dolore magna aliquyam erat, sed diam voluptua. At vero eos et
accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
no sea takimata sanctus est Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
erat, sed diam voluptua. At vero eos et accusam et justo duo dolores
et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est
Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur
sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore
et dolore magna aliquyam erat, sed diam voluptua. At vero eos et
accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
no sea takimata sanctus est Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam
et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea
takimata sanctus john.doe@example.net
est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur
sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam
+49 99 123456-7 et justo duo dolores et
ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est
Lorem ipsum dolor sit amet.
Emphasis
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet.
This text has
a marked part
in it.
H2O
8 m2
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
erat, sed diam voluptua. At vero H2O eos et accusam et justo duo dolores
et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est
Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur
sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore
et dolore magna aliquyam erat, sed 8 m2 diam voluptua. At vero eos et
accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
no sea takimata sanctus est Lorem ipsum
dolor
sit amet.
At vero eos et
accusam et justo
duo dolores et ea
rebum. Stet clita kasd gubergren, no sea takimata sanctus est
Lorem ipsum dolor sit amet.
Abbreviations
WHATWG
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
erat, sed diam voluptua. At vero eos et accusam et justo duo dolores
et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est
WHATWG
Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur
sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore
et dolore magna aliquyam erat, sed diam voluptua. At vero eos et
accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
no sea takimata sanctus est Lorem ipsum dolor sit amet.
Text fragments
A link to a text fragment
scrolls to its words and marks them with ::target-text, in the
brand color. These words are picked out by the browser.
Quotation and citation
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
erat, sed diam voluptua.
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
erat, sed diam voluptua.
Author foo, in Book foo
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet
Code
Execute the command ls -la in a shell.
function foo() {
return 42;
}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
ls -la
erat, sed diam voluptua. At vero eos et accusam et justo duo dolores
et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est
Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur
sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore
function foo() {
return 42;
}
et dolore magna aliquyam erat, sed diam voluptua. At vero eos et
accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
no sea takimata sanctus est Lorem ipsum dolor sit amet.
function foo() {
return 42;
}
just some
preformatted
stuff
Sample output
Output of another programm e.g. a shell
Lists
Unordered lists
an item
just one more item
another item
Ordered lists
an item
just one more item
another item
Mixed lists
an item
lorem
ipsum
dolor
just one more item
another item
Definition lists
a term
a definition
another term
a definition
another definition
Grouped in div elements, as HTML allows, the grid stays the same.
a grouped term
a definition
another grouped term
a definition
another definition
Menu
Tables
Lorem ipsum dolor sit amet
Table head 1
Table head 2
Table head 3
Lorem ipsum
Lorem ipsum
Lorem ipsum
Lorem ipsum
Lorem ipsum
Lorem ipsum
Lorem ipsum
Lorem ipsum
Lorem ipsum
Table foot
Table foot
Table foot
Wide tables
Wrapped in a figure, a table scrolls sideways instead of
widening the page.
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Lorem
1,337,897
1,240,558
9,829,614
6,142,577
1,781,405
3,006,134
3,864,186
6,048,241
5,623,190
8,347,582
6,116,597
2,546,508
Ipsum
1,366,641
2,299,808
3,016,803
8,809,432
5,996,901
4,592,676
9,276,526
8,572,783
1,189,310
4,593,001
7,694,178
3,194,021
Figure
Lorem ipsumLorem ipsum
Media content
Video
Audio
Inline SVG
Canvas
Iframe
Text fields
Input types
Range variants
Select
Select as a list box
Checkbox and radio
Toggle switch
Should only be used to apply state (not context), be binary (not different options),
(de-)activate (not perform action) and immediately persist without using additional buttons.
Validation
A hint right after a field, or after the label wrapping it. It turns
into the error once the field is invalid.
The native counterpart. It only marks the field once the visitor
has typed in it and moved on, not while the form is still untouched.
Check it and uncheck it again: a required box left empty is invalid
from then on.
At least twelve characters.
Buttons
Input type buttons
Primary button
Filled with the brand color. The label turns black or white by itself,
whichever the brand color can carry, so a project only sets the one token.
Outline button
Status button
.success, .warning, .danger and
.info put the status color where the brand color would be,
so they combine with .primary, .outline and
.compact.
Link button
A link that looks like a button, with .button. It still
leads somewhere, so it stays a link for assistive technology. The
button variants work on it as well.
A button that holds nothing but an icon, square and as tall as a field,
so it lines up with the controls next to it.
Next to buttons with a label, and in a toolbar, where a pressed one keeps
the surface of a pressed button.
Compact icon button
An icon button without a surface, for tables and lists where a button as
tall as a field would stretch the row. The icon takes the brand color on
hover and focus, a pressed one keeps the surface of a pressed button.
File
Size
Actions
report.pdf
1.2 MB
photo.jpg
3.4 MB
Button combinations
The status classes recolor whatever the variants use the brand color
for, so every pairing works, on a link with .button as well.
Of .compact, .primary and .outline
only one applies, in that order, and .icon goes with any.
Inside a form, a label stands above its control and the
control takes the full width. A check box or a radio stays beside its
label. Part of the layout bundle.
Field row
Fields and buttons side by side with .field-row, lined up on
the control rather than on the label above it. It wraps once the room
runs out.
Field group
Controls welded into one, with .field-group on a wrapper.
Control borders
Every control has a border already, transparent until a project colors
it. Here --color-input-border and
--color-button-border do, with the fields moved onto the
page color. Nothing moves when the border shows.
Output element
Progress element
Meter element
Disk space:
800GB
Temperature:
19°C
Notice
A note in the grays of the page, with .notice alone.
Saved. .notice.success
Almost out of space. .notice.warning
Could not be saved. .notice.danger
A new version is out. .notice.info
Maintenance on Sunday
The service is down for about an hour. Two things to know:
drafts are saved locally
uploads have to be repeated
Details
Foobar
Lorem ipsum sit amet
Lorem ipsum sit amet
Exclusive accordion
Details sharing a name open one at a time.
Lorem
Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
Ipsum
Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
Dolor
Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
Dialog and popover
Popover
Light dismissed, no JavaScript needed.
Tooltip
A tooltip is its own element with role="tooltip", and the
trigger points at it with aria-describedby — that way the
text becomes the trigger's description instead of replacing its name.
With popover="hint" on the tooltip and
interestfor on its trigger, a browser that knows the two
opens it in the top layer and closes it on Escape.
Saves without closing the dialog
Flips instead of running off the viewport
The optional styles/tooltip-description.css does the same with no
element at all — one aria-description on the trigger, rendered by
a pseudo element. It flips the same way:
Both flip against the viewport, not against this column. The demo
body stops at --content-width, so on a wide window there is
still room to the right of these buttons and neither of them turns around —
narrow the window to see it happen.
Navigation
Article
Lorem ipsum
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
erat, sed diam voluptua.
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita
kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Cards
Colors
Foreground
Background
Border / Input / Button
Brand
Success / Warning / Danger / Info
Color scheme
Every color is a light-dark() pair, and those tokens stay
unresolved until the element that finally reads them. That is why
color-scheme keeps working further down the tree, so
data-color-scheme can sit on any element instead of only on
<html> — as the switch at the top of this page does.
States a project marks up with ARIA rather than with a class of its own.
aria-pressed
A toggle button that stays down while it is on.
aria-disabled
Dimmed like :disabled, but still reachable by keyboard, so
the reason it cannot be used can still be announced. Blocking the action
itself stays the project's job.
aria-busy
A progress cursor over anything that is still loading.
Hover this paragraph, it claims to be busy.
inert
A subtree taken out of the page: not clickable, not focusable, skipped
by find-in-page. Tab through the buttons above and this one never
receives focus.
An inert region.
Utility classes
.sr-only
Off the screen, still announced.
This sentence exists only for a screen reader.
.ellipsis
A single line that was given far less room than it would need, so it ends in an ellipsis.
.skip-link
The first element in the body, pointing at the main content. It waits
off-screen until it takes focus — press Tab right after the
page loads and it slides in at the top left of this page.