This page puts two things side by side: a piece of code and what the browser makes from it. It is a practical guide for designers and frontend developers.
The Preview theme control lets you choose System, Light or Dark. Light and Dark override the browser preference; System restores it. Code examples and rendered previews follow the same choice.
In the newer parts of the system, we do not use classes to tell CSS “this is a card” or “make this text purple”. HTML elements already describe much of the structure. When a specific role needs to be declared, we add a data-* attribute, for example data-layout="home-cover".
The choice began as a way to keep content readable and free of visual instructions: Markdown tells the story, the template shapes the structure, and CSS recognises elements and relationships. The transition is in progress, not complete: older components still use classes. The rule for new code is to avoid adding them when semantics and descriptive attributes are enough.
Type has three voices
HTML
<h1>Scivolare di nuovo</h1>
<p>Appunti per continuare a pensare.</p>
<p><a href="#">Un collegamento nel testo.</a></p>
<blockquote>Una frase resta in margine.</blockquote>
IM Fell English gives headings their character, Alegreya carries the reading voice, and Oswald handles navigation and metadata. The elements set the hierarchy; the font tokens set the texture.
data-layout names a supported image role. The same figure rule works wherever the image appears; the Markdown stays about the image, not its margins.
Structure makes the list
HTML
<section>
<article>
<h3>Una banana evoca la caduta</h3>
<p>Un’icona, una scena, un significato.</p>
</article>
</section>
Rendered
APPUNTI · LINGUAGGIO
Una banana evoca la caduta
Un’icona, una scena, un significato.
WORK · RICERCA
Capire prima di decidere
Un sistema di scelte che diventa leggibile.
The browser sees a section containing articles. A direct-child relationship gives the grid its boundary. No class is needed to make a card-shaped box.
A note enters the text
HTML
<div data-comments-root>
<div data-comments-bar>
<span data-comments-label>Nota a margine</span>
<button data-comments-toggle>Nascondi le note</button>
</div>
<article data-comment>
<p data-comment-meta>Ada · 4 novembre</p>
<p data-comment-body>La banana è già una storia.</p>
</article>
</div>
Rendered
Margin note
Ada · 4 November
The banana is already a story.
The data-* names are both styling hooks and JavaScript hooks. This miniature has no API endpoint, so its button is an illustration, not an active control.
The theme swaps shared tokens in response to the device preference. Images keep their original colour and material.
HTML elements used on the blog
This inventory comes from the rendered blog pages. Each item is a real HTML element; the visual role comes from its meaning, its position and, when needed, a descriptive data-* attribute.
Document
html
head
title
meta
link
script
body
These elements define the document and load its metadata, styles and behaviour. Most of them do not appear in the page itself.
Structure
header
nav
main
section
article
aside
footer
div
Semantic elements describe the job of each region. div groups content when no more specific meaning applies.
Text and hierarchy
h1
h2
h3
p
a
blockquote
cite
strong
em
small
span
br
time
hr
Headings organise the outline; the other elements mark paragraphs, quotations, emphasis, dates and pauses.
Lists
ul
ol
li
Use ul for unordered groups, ol for sequences and li for each item.
Images and media
figure
picture
source
img
iframe
picture and source provide responsive image files; figure gives an image a place in the story.
Forms and actions
form
fieldset
legend
label
input
textarea
button
These elements group related fields, identify them and let a reader send a message or change a view.
Vector graphics
svg
path
svg contains scalable drawings; path describes their shapes.
How styles find their target
Styles follow three clues:
The element:h1, p, figure, blockquote, article.
The relationship: a figure within a post’s flow, or articles inside the section that groups them.
The declared role:data-layout, data-post-flow, data-card-kind or another data-* attribute when the element alone is not enough.
A data-* attribute should describe a stable role, not a temporary decoration. data-layout="home-cover" names the image’s layout behaviour; data-purple or data-big would describe isolated visual choices better handled in CSS.
The same attributes can connect JavaScript to the markup. In the margin-notes component, for example, data-comments-list identifies the list to update when the API responds. User-submitted text is inserted as plain text, never interpreted as HTML.
Typography and tokens
Direction 08 uses three typefaces, each with a distinct voice: IM Fell English for headings and accents, Alegreya for reading text and quotations, and Oswald for navigation, labels and metadata. The fonts are served from assets/fonts/, with no external service requests. Their SIL Open Font Licences are included alongside the files.
The tokens at the start of assets/style.css name shared decisions:
--ink, --bg and --behind define text and surfaces;
--red marks editorial accents; --link marks links and clickable actions. Purple therefore signals interaction, while red gives emphasis to the content;
--display, --reading and --interface assign the three type families;
--base-font and --h1-size set fluid scales;
--col sets the maximum content measure.
The dark theme swaps token colours through prefers-color-scheme. It does not filter images: photographs and illustrations keep the colours and material they were chosen with.
Images and components
Image layout is declared with data-layout; values and Markdown syntax are documented in requirements/immagini-layout.md. An opening photo keeps its aspect ratio, a gallery follows the story’s sequence, and Work plates retain their original paper.
Margin notes use attributes such as data-comments-root, data-comments-list and data-form-toggle. The template places them in the article’s flow; JavaScript loads and sends notes; assets/xmpp-discussion.css sets rules, typography and controls. Readers can hide the whole notes stream or open the form when they want to contribute.
Before adding a rule
Decide whether a choice is shared; if so, consider a token.
Choose the least specific selector that accurately describes the structure.
Avoid broad selectors such as section without checking every affected section.
Keep component styles near their data-* hooks and document exceptions.
Check desktop and mobile, light and dark themes, long titles and different image ratios.
assets/style.css still contains historical rules alongside direction 08. A rule’s position in the cascade matters: when a page looks different from what you expect, first find the selector governing it and where that rule comes from. Appending an override without tracing that path makes the code harder to understand next time.
Project map
requirements/direzione-visiva.md — editorial principles and composition.
requirements/implementazione-direzione-editoriale-commenti.md — templates, CSS and notes flow.
requirements/immagini-layout.md — image roles, variants and optimisation.
The HTML elements used on the blog section lists the elements found in generated pages: it is an inventory of published markup, not a theoretical list.