Components
Contents:
§ Box
The .box class creates a padded box with a border.
Boxes use the border and background color of the colorway.
<div class="warn box">
<strong>Warning</strong>: If you're putting <!-- ... -->
</div>
Warning: If you're putting something in a box, make sure to clarify why it is in a box in some other way. For example, this box has "Warning" in bold, in addition to being yellow. This makes your page clearer and prevents accessibility failures.
The above box, in addition to being an example, is also a genuine warning.
The <figure>, <details>, and <dialog> elements share their appearance with the .box class.
§ Titlebar
.titlebar: A titlebar for a .box.
<div class="bad box">
<strong class="titlebar">Error</strong>
<p>Task failed successfully
</div>
Task failed successfully
§ Subtitle
The <sub-title> custom element or the .sub-title class is a subtitle for a heading.
Visually hiding a colon with the <v-h> element can help screen readers parse the heading correctly.
<h4>
Conference Talks Considered Harmful<v-h>:</v-h>
<sub-title>How I Learned To Stop Worrying and Love Baz</sub-title>
</h4>
Conference Talks Considered Harmful:
How I Learned To Stop Worrying and Love Cliché Titles
<h4>
<sub-title class="allcaps">Breaking<v-h>:</v-h></sub-title>
Bad Thing Happens
</h4>
Breaking:
Bad Thing Happens
§ Section permalinks
Many pages, including these docs, have links that can be used to jump to a section that appear when the heading is hovered.
Missing.css provides this as the .permalink-anchor class.
<h2 id=section-permalinks class="packed" tabindex=-1>
<a class="permalink-anchor float:inline-end" href=#section-permalinks>§</a>
Section permalinks
</h2>
§ Section permalinks
§ Toolbar
A .tool-bar is a horizontally laid-out collection of controls.
Alternatively, you can use role=toolbar.
<section role=toolbar>
<button type=button>Cut</button>
<button type=button>Copy</button>
<button type=button>Paste</button>
<hr aria-orientation=vertical>
<label>Find: <input type=text></label>
</section>
§ Sidebar
Use the .sidebar-layout class to create a sidebar/main layout.
Put sidebar content in a <header> element directly inside .sidebar-layout, and the next element will house the rest of the page.
The width of the sidebar can be set using the --sidebar-width variable.
See this example:
<div class="sidebar-layout">
<header>
<ul role="list">
<li><a href=/>Home</a></li>
<li><a href=/profile>Profile</a></li>
<li><a href=/settings>Settings</a>