Through this documentation which doubles as a demo page for Base.css, a base stylesheet powered by doc-first markup, a work in progress, you can, still, use the Style Sheet selector of Elo to compare the value of Base.css to similar stylesheets.

Beside using this very document, as a whole, to justify the comparisons, there are illustrations under most subsections to justify comparisons of components.

Base Stylesheets

Reset Stylesheets

Normalize Stylesheets

Classless Stylesheets

The rules of user-based styles

The styles of a webpage, any webpage, always begin with a browser stylesheet — a set of default CSS rules for HTML elements. It's inevitable. Google Chrome, Mozilla Firefox, and every other browser comes with one.

Without this sheet, development would have start from a screen with ghosts; a screen with invincible content. No color rules to differentiate foreground content from background space. No size rules to ensure a visible dimension.

With this sheet, the ghosts come alive; content becomes visible. You start to see things.

Developers, while having a safety net to build upon, must deal with the inconsistencies of styles across all browsers. The horrors of cross-browser compatibility.

Users, on the other hand, deals with poor readability of content. Nonetheless, they can personalize the page with their preference of color mode, font size, and font family. Poor but customizable.

Fair readability for users and inconsistent styles for developers are the banes of browser stylesheets.

Then comes reset stylesheets. It was popularized by Eric Meyer's reset.css in 2007. They flattens presentation styles of content. The ghost you now see looks like another. For one, headings are no different from paragraphs.

Developers get consistent styles across all browsers. In addition, it encourages the use of semantic elements. Devs can no longer, lazily, use elements based on their presentational style.

Users, meanwhile, get poor readability. Worse. It takes extra effort from developers to get that fair readability of browser stylesheet, if they need a doc page.

Poor readability for users and need for styles from developers are the banes of reset stylesheets. We trade fair readability for better consistency.

Then comes normalize stylesheets. It was popularized by Nicolas Gallagher's normalize.css in 2012. It preserves useful defaults and fixes the poor ones.

Developers get consistent styles.

Users maintain fair readability.

Fair readability, unfortunately, is still not enough. It is the bane of normalize stylesheets. Eyes have to sweep a long distance, depending on how wide the viewport is, to read a page. Sometimes, the eyes miss the next line to read.

Then comes classless stylesheets. Lexi Mattick's water.css is a popular choice since 2018. They prioritize better readability. Some classless stylesheet like magick.css strongly recommends using normalize.css.

Developers can get consistent styles.

Users get better readability, and, many a time, fair customizations that are more or less than browser sylesheets. Unfortunately, on poor semantics.

Fair customizations and Poor semantics are the banes of classless stylesheets.

Now comes Base.css, a base stylesheet by Toheeb Ogunbiyi in 2025. A 3 in 1: Base.css, the reset stylesheet; Base.css, the normalize stylesheet; Base.css, the classless stylesheet.

Developers get consistent and semantic styles

Users get better and customizable readability.

The ghosts are their best. Developers can use them as-is or build upon for web apps and web docs. Users can wave their magic wand to wear a different skin on ghosts.

Base.css

Introduction

The web's first multipurpose base stylesheet, with the most semantic rules, for complete customization and personalization.

Base.css is: first, a classless stylesheet; second, a normalize stylesheet; third, a reset stylesheet; and, fourth, every shit between those sheets. An all in one.

Through a mix of 13 properties, for customizations, developers can: reset or normalize a page for web apps, power readability of content for blog posts, and, as well, do both on the same page.

On top of developer's choices, users may personalize the aesthetics of the deployed page with a plugin like Elo.

Base.css is, by far, the most semantic classless stylesheet there is, so far. It's the only stylesheet that has unique styles for components. Verify by switching the classless stylesheets, with Elo, on the illustrations in the following sections.

Start using base.css in 2 steps:

  1. Create a web page with semantic HTML

  2. Link the stylesheet from a CDN, as shown below.

    <link rel="stylesheet" href="https://unpkg.com/@toheeb/base/base.css">
    

Properties

Shape and Fill are the 2 fundamental design elements. Like a yin and yang, you need a fill to reveal a shape and you need a shape to have a fill.

Other design elements in the wild are color, space, form, line, texture, and so on; but, they are far-fetched.

Fill can be 3 things: a color, a blend of colors called gradients, or a free-form blend of colors called textures.

Shapes can be glyphs or objects. Glyphs are text characters while object are media characters. This object can, further, be 3 things: a dot if height and width are collapsed, a line if height or width is collapsed, or a form if in a 3-dimensional area.

In design, any kind of design, color is the basic type of fill. In web design, glyphs are the basic shapes of a page, not objects, since web pages are web documents.

Browsers, since time memorial, provide means to modify properties of glyphs like font size and font family. It stops at that. To modify other properties, you need a browser extension like Elo.

CSS, on the other hand, provides partial and indirect support for customizations. While CSS cascade down user's preferences of font size, it doesn't for font family. It takes some workarounds to ensure cascade from the document root. This cascade is needed for customization of design elements.

Illustration testing customizations

Like shapeshifters, except this is not a myth, awo, a base stylesheet, can be used as a reset stylesheet, normalize stylesheet, classless stylesheets, and, moreso, every possible shift between those sheets.

With font scale, lead scale, and line height set to one, each; border width, and height offset to zero, each; and, line length to 100%; you The page goes flat; No design hierarchies.

When you continue with font scale greater than one, like 1.125 — a major second; lead scale of half lead; and line height of one and a half; you

When you, further, continue with: a border width of choice, say 1; a height offset as dictated by the typeface; a suitable line length, say 75ch — 2.5 alphabetical length; and a pseudo content of initial; you

There's no fine line between these phases. You can mix these customization options as you deem fit: ; ; ; ; ; ; ;

Each form of shapeshifting can, like a chameleon, have any color theme by changing the base . In addition, a different typeface by changing the

Not only can you use one of reset, normalize, or classless stylesheets, you can, also, use two or all stylesheets, on the same page. You can go donut.

So far, you've seen the classless form around the next mix. In the next mix, for the donut demonstration, you should see content in the reset form; see content without space. Taking it further, within that resetted mix is a mix with the classless form. It's like stucking a donut within the hole of another donut. On and on.

Classless State

A donut demonstration

Say we have a webpage, this demonstration, and we apply a classless state.

See the hierarchical spacing and sizes, then section tiers and demarcation?

Now, let's put a hole inside this section flour

Reset State

A reset section within a classless section.

See what has, or should, happened?

There's hardly spaces between lines talkmore of blocks. Like it were in the parent section.
This is because line height and lead scale are set to one each. As well as the height offset becoming zero.

While you can differentiate headings from paragraphs, I bet, you can't be sure of how many paragraphs are there.

There's, also, no tier system on this section heading. That's because of a content of none applies to only this section content.

There's, also, no demarcation of parts on and in this section. That's because border width is set to zero.

What we can't see happen on this section is a change in font family. This option applies to the page as a whole. Because tts value is a string, and strings can't generate versions for varieties. Instead, we'll bank on font alternate to change font family midway.

Classless state

A classless section under a non-classless section that is under a classless section

Now, see what has, or should, happened?

This section is like the grandparent section with the hierarchical spacing and sizes, with section tiers and demarcation

We've created a donut with this section's grandparent and parent. With this section, it's like starting to create a new donut within that donut. And so it may continue.

When all is done and dusted by a developer. Users should be able to pick up the mantle of personalization.

Users can start personalizing via the browser settings; changing font size and color mode. The page, like this page, should respond accordingly.

And if users were to do more, to change typeface, spacing, color, and measure, with elo, for example, the page, like this page, also, should respond accordingly.

The Root Style Rules
  1. Set customization options on the the root element for all elements

    Use native properties for font family and font size options.a

    For font size, CSS has font relative units to create variations from the root or parent value.

    For font family, it's useless to use custom property. Its value, a string value, can't create variations. Variation of font family would be by, if possible, using font variant alternates. a

    Use custom property for line height. This maintains unitless value while creating automatic variations for blocks. b

    Use custom property for pseudo content. This enables fallback trick for its native counterpart. c

    Use custom property for the others due to lack of native properties. d

  2. Prevent adjustments of font size orientation changes in iOS

  3. Remove padding and margin, use box model of border box, and inherit color and font on all elements.

/* 1 */
:root {

  /* 1a */
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  
  /* 1b */
  --line-height: 1.7;
  
  /* 1c */
  --content: initial;

  /* 1d */
  --line-length: 36rem;
  --line-lead: calc((1lh - 1ex) * .5);
  --font-scale: 1.2;
  --color-hue: 120;
  --lh-pad: .25em;
  --border-width: 1;

  --background-color: light-dark(
    oklch(.99 0.0046 var(--color-hue)), 
    oklch(.2 .02 var(--color-hue))
  );

  --foreground-color: light-dark(
    oklch(.2 .0246 var(--color-hue)), 
    oklch(.8 .0046 var(--color-hue))
  );

  --border-color: light-dark(
    color-mix(in srgb, currentColor 10%, transparent 100%),
    color-mix(in srgb, currentColor 20%, transparent 100%)
  );

  /* 2 */
  -webkit-text-size-adjust: 100%;
}  

/* 3 */
*
{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  color: inherit;
  font: inherit;
}

Font family

Given a page with no declaration for font family, content will inherit the user's preference from the browser settings. And, responds to user's changes.

The moment a webpage has, at least, a declaration, a thing developers do, it stops responding to user's changes in the browser settings. Nothing a user prefers that will supercede a developer's preference. This limitation only applies to the option via browser settings. It doesn't applies to extensions like Elo.

A font family declaration is a set of typefaces to create safer designs, not richer designs. Subsequent typefaces are fallbacks in case the previous typefaces fail to load.

To create richer designs, a design with mulitiple typefaces: 2, 3, 4, or any number, a developer need the respective no of declarations. Similarly, a user need the respective no of forms to change those declarations.

Using multiple typefaces requires a sound knowledge of type pairings. A knowledge many designers and developers suck at.

Rather than presenting multiple forms to users, delegating the nerdy task of type pairing to simple users who want nice pairing without any effort, we present one form for one typeface. A re-engineered typeface.

As of now, OpenType fonts can include alternate glyphs of some main glyphs. It takes CSS's font-variant-alternates property to choose preferred alternates.

Rather than having alternates of some glyphs, we'll have alternates of the whole glyphs. We'll have Many-in-one font. There'll be no need to look for nice pairs; it's baked in.

So, a font, for a script like latin, will have glyphs for characters (letters, puntuations, and numbers) in the following variations:

  • Class

    • Space: monospace and proportional

    • Type: sans, serif, and cursive

  • Axis

    • Weight: thin (100) to black (900)

    • Width: ultra-condensed (50%) to ultra-expanded (200%)

    • Style: normal and italic

  • Cases: smalls, caps, and small caps

  • roles: caption, body, and display

One font becomes a font system. Users can choose a font, with all typeface variations, and have the webpage responds to the variations it supports.

Font Size

Unlike for font family, CSS provides relative units for font sizes. One of such units, em, inherit the font size of a parent that has one. In the lack of that parent, as in the case of html element, it inherit the user's preference in the browser settings.

Font size determines the size of glyphs — the primary shape. It should also determine the size of objects — the secondary shapes, if they are to be responsive.

Beside font sizing, zooming also sizes the shapes on a page. Yet, font sizing has one advantage; it applies to designs across opened tabs in the browser.

Designs rarely use one size for its components. They need many sizes for visual hierarchy, and a type scale to ensure harmony across those sizes.

It takes a custom css property to implement the type scale for a size system.

A typical type size system for a webpage grow sizes for the following order of components: preheadings, section contents, postheading, heading level 6 to 1. Offsides like ::markers inherit from containers while Asides like ::before can inherit from their blocks.

Illustration testing block sizes

Heading Level 1


Heading Level 2


Heading Level 3


Heading Level 4


Heading Level 5

Heading Level 6

Postheading


Section content


Preheadings

Font Size Rules
  1. Increase font size on blocks in order of preheadings, paragarphs and titles, postheadings, heading level 6 to 1.

    Use em units to allow containers bump up or down font sizes independent of another container.

    Like the paragraphs, the main content blocks, html, the root container, uses the same font size to set font size on other containers for their psuedo elements — out-of-block contents.a

hgroup > p:has(~ :is(h1, h2, h3, h4, h5, h6))
{
font-size: calc(pow(var(--font-scale), -1) * 1em);
}

p, pre,
dt, th, legend, summary,

/* a */
html
{
font-size: calc(pow(var(--font-scale), 0) * 1em);
}

hgroup > :is(h1, h2, h3, h4, h5, h6) ~ p
{
font-size: calc(pow(var(--font-scale), 1) * 1em);
}

h6
{
font-size: calc(pow(var(--font-scale), 2) * 1em);
}

h5
{
font-size: calc(pow(var(--font-scale), 3) * 1em);
}

h4
{
font-size: calc(pow(var(--font-scale), 4) * 1em);
}

h3
{
font-size: calc(pow(var(--font-scale), 5) * 1em);
}

h2
{
font-size: calc(pow(var(--font-scale), 6) * 1em);
}

h1
{
font-size: calc(pow(var(--font-scale), 7) * 1em);
}

Line Height

Line height distributes space around lines of text in a block. In the spirit of continuity, it should also manage that between blocks, and containers. In short, it should manage the vertical space of a document.

For cohesion within blocks, because of their differing sizes, line height decreases as the font size increases.

The lead that line height creates, a subtraction of one x-height from one line-height, on a basic block, paragraph blocks, becomes the base space unit. Not some arbitrary 4-point or 8-point grid unit. Afterall, glyphs, not objects, are the primary shape of a document.

Lead, together with a lead scale, creates an arithmetic sequence of space units for content gaps, and section margins.

When a block-level object media is at either start or end of a block, they impose a margin start or bottom to compensate for their lack of ascender space or descender space; respectively.

Illustration testing space hierarchy

Heading Level 1

Heading Level 2

Heading Level 3

Heading Level 4

Heading Level 5
Heading Level 6

Just look up. I'm not talking about the song, but the headings. The up of each heading is how you check their space heirarchy.

Still, look up. Not to the headings but the paragraph above this on. This time, look between the lines, then the paragraphs. See the space grow? Hierarchy!

Line Height Rules
  1. Make body height a minimum of the viewport height.

  2. Apply relative line height on each block, progressively.

  3. Create hierarchical vertical space on block-level elements.

    Apply one unit of --line-lead on block-level media phrases, and paragraphs.a

    The absence of ascender space and descender space on those media creates a space hierarchy, lower hierarchy, to that of paragraphs.

    If paragraphs start or end with block-level media, a double units, at respective end, compensates for missing ascender and descender space. b

    For a paragraph with trailing block-level media, there's no need for height offset.c

    Increase the unit by one each on heading level six to one.d

/* 1 */
body
{
  min-height: 100svh;
}


/* 2 */

h1
{
  line-height: calc(1 + ((var(--line-height) - 1) / pow(var(--font-scale), 7)));
}

h2
{
  line-height: calc(1 + ((var(--line-height) - 1) / pow(var(--font-scale), 6)));
}

h3
{
  line-height: calc(1 + ((var(--line-height) - 1) / pow(var(--font-scale), 5)));
}

h4
{
  line-height: calc(1 + ((var(--line-height) - 1) / pow(var(--font-scale), 4)));
}

h5
{
  line-height: calc(1 + ((var(--line-height) - 1) / pow(var(--font-scale), 3)));
}

h6
{
  line-height: calc(1 + ((var(--line-height) - 1) / pow(var(--font-scale), 2)));
}

hgroup > :is(h1, h2, h3, h4, h5, h6) ~ p
{
  line-height: calc(1 + ((var(--line-height) - 1) / pow(var(--font-scale), 1)));
}

p, pre,
dt, th, legend, summary,

html
{
  line-height: calc(1 + ((var(--line-height) - 1) / pow(var(--font-scale), 0)));
}

hgroup > p:has(~ :is(h1, h2, h3, h4, h5, h6))
{
  line-height: calc(1 + ((var(--line-height) - 1) / pow(var(--font-scale), -1)));
}


/* 3a */

video,
audio, 
iframe, 
object,
svg:not([height='16']), 
img:not([height='16']),

p,
pre
{
  margin-block: var(--line-lead);
}


/* 3b */

:is(p, pre):has(> span:first-child):has(> span:first-child > :is(audio, video, iframe, object, svg:not([height='16']), img:not([height="16"])):only-child)
{
  margin-block-start: calc(2 * var(--line-lead));
}

:is(p, pre):has(> span:last-child):has(> span:last-child > :is(audio, video, iframe, object, svg:not([height='16']), img:not([height="16"])):only-child)
{
  margin-block-end: calc(2 * var(--line-lead));

  /* 4c */
  padding-block-end: 0;
}


/* 3d */

:is(section, article):has(> hgroup > h6) {
  padding-block-start: calc(2 * var(--line-lead));
}

:is(section, article):has(> hgroup > h5) {
  padding-block-start: calc(3 * var(--line-lead));
}

:is(section, article):has(> hgroup > h4) {
  padding-block-start: calc(4 * var(--line-lead));
}  

:is(section, article):has(> hgroup > h3) {
  padding-block-start: calc(5 * var(--line-lead));
}

:is(section, article):has(> hgroup > h2) {
  padding-block-start: calc(6 * var(--line-lead));
}

:is(section, article):has(> hgroup > h1) {
  padding-block-start: calc(7 * var(--line-lead));
}

Line length

Line length caps content. It helps the reader's eyes flow easily from a line end to the start of the next line.

It caps blocks and mixes, not containers, to allow for multi-column content within containers.

The cap on mixes ensures markers and borders are beside their blocks.

On segments, at a screen width beyond the line length, an extended cap, an extension by one leading, makes their markers visually apply to all content, rather than the nearest block or mix.

On paragraph separator, a quarter cap conveys a thematic change. By quarter, or anything significantly less than 1 and more than 0, there's a visual distinction from partitions.

With a padding inline on landmarks, on root containers, all content get a breathing space to the inline edges of the viewport.

Line Length Rules

Cap components progressively:

  1. Cap landmarks at one and a half of the line length, for aesthetic purposes.

  2. Cap segments at the line length with an extension of 3 --line-leads at each ends.

    The extension makes segment icons seem for the segment rather than for the neighbouring block or mix.

  3. Cap mixes and blocks at the line length to allow for multi-column within segments or landmarks.

  4. Cap paragraph separators at one-fourth of the line length

Prevent content from touching the inline ends of containers for dimensional content.0a

/* 1 */
*:has(~ main), main, main ~ *
{
  width: 100%;
  max-width: calc(1.5 * var(--line-length));
  margin-inline: auto;
  border-inline: calc(var(--border-width) * 1px) solid var(--border-color);
}

/* 2 */
section:has(> hgroup) > *:not(:is(section:has(> hgroup), hgroup))
{
  width: 100%;
  max-width: calc((6 * var(--line-lead)) + var(--line-length));
  margin-inline: auto;
}


/* 3 */
p,
pre,
th,

ol,
ul,
dl,
menu,


hgroup,

figure, 
figure, 
address,
details,
fieldset, 
blockquote, 
a:has(:is(p, pre)),
del:has(:is(p, pre)),
ins:has(:is(p, pre)),
map:has(:is(p, pre)),
object:has(:is(p, pre, h1, h2, h3, h4, h5, h6, summary, legend, dt, th)) > div:only-child
{
  width: 100%;
  max-width: var(--line-length);
  margin-inline: auto;
}


/* 5 */
hr 
{
  width: 100%;
  max-width: calc(.25 * var(--line-length));
  margin-inline: auto;
}


/* 0a */
td, 
th,
caption,
*:has(~ main), main, main ~ *
{
  padding-inline: calc(3ch * var(--border-width) / var(--border-width));
}

Color

Browser stylesheets come with color pallete for dark and light color mode out-of-the-box.

Developers can declare their support for either or both modes via a color-scheme meta tag in HTML or style property in CSS. To respect this support, developers must use light-dark() function to declare pallete rather than using the prefers-color-scheme media query.

Users, on the other hand, may choose their preferred mode via the browser settings.

Both users and developers can't theme the color pallete because browsers use named colors which are uncustomizable.

Customizable Color pallete builds on color components of color models.

CSS supports many color models. Human-based models such as HSL, HSB, HWB, and LCH are more intuitive than Computer-based models such as Hex, RGB, and Lab. They describe colors with components that aligns with how humans perceive and interpetes color.

Of the human-based models, LCH is the only choice for a customizable design. It has a perceptually uniform model. Users can change a component of a color and other colors in the pallete will adjust accordingly. Better still is OKLCH — an improved version of LCH. OKLCH uses Lightness, Chroma, and Hue components.

The primary color component is Hue. Lightness and Chroma creates variations. Variations for one hue is a monochromatic pallete; for 2 hues is diadic; for 3 hues is triadic; and so on.

CSS can programmatically create a live pallete from one hue using calc(). A 90deg deviation creates a complementary scheme; a type of diadic. Other deviations create as richer as possible of a pallete. A live and responsive pallete, based on one hue, thanks to OKLCH().

CSS has no native property for color hue, but an equivalent custom property works (--color-hue)

Color Rules

Set and apply foreground and background color for content via their windows

body,
dialog
{
  background-color: var(--background-color);
  color: var(--foreground-color);
}

Styles

Styles are the differentiating factor. They are what makes a component look, feel, and sound distinct.

The web is filled with unsemantic styles: the absence of styles, the misuse of styles, the lack of unique styles. This can be seen through the lens of base stylesheets, as of writing.

  • None identifies landmarks, segments, preheading blocks, postheading blocks, and many other components. Absence of styles.

  • Some infer a navigation style on any list found within a nav element without ensuring its accessibility. Misuse of styles.

  • All use same styles on multiple components. Like same bold font weight on Title Phrase and Keyword Phrase. Lack of unique styles.

Blocks

All lead blocks, heading blocks and title blocks, are bolden to draw attention to their content.

Preheading blocks are inline-leveled to introduce as many taxonomies as possible without taking much screen space. Postheading blocks remained block-leveled as it buttress main headings.

Each heading group prompts a parent section that sit besides other parts called segments. Moreso, the root section prompts the main landmark that, also, sit besides other parts called landmark.

It takes lines to demarcate parts, and icons to distinguish those partitions. Same partitioning styles apply to some other components. For aesthetics purpose, landmarks use inline borders capped to one-half of the line length.

Sections use the same partitioning styles of windows to distinguish segments. All segments but heading groups and custom segments use no icons. Heading groups are uniquely identified by its bold heading block; custom segments are, well, custom to the developer.

In addition, sections use tier systems to relate their heading level and position.

A title's card, like a heading's section, is partitioned to separate leads from followers. Expecially, leads from sets of followers like we may have in a description item.

Yet, out of all 4 titles, only a detail's title and a fieldset's title influence the partition of their card.

Furthermore, a detail's title positions its marker outside of its block. Safe, because of the card's style, it wouldn't collapse on other markers, like a list marker if it's the first child of a list item.

All follower blocks, plain paragraphs and preformatted paragraphs, maintain normal font weight.

Unlike plain paragraphs, preformatted paragraphs use monospace font to preserve their semantics — preformats. If a proportional font had been used, it requires that same font to preserve any preformats.

Illustration testing blocks

Starting from this very part, a header landmark, to the first non-empty part, you should count 6 more landmarks.

 

 

 

 

Kicker

Overline

Shoulder

Rider

What's in a heading level?

The postheading block that sweetmouth the main heading if we're to have sense.

The act of a main heading as postheading if we're to break rules.

Kicker, Overline, Shoulder, Rider, or whatever-you-can-call-it should run inline at the top of the heading. Screen space can't afford each of an unlimited preheadings to stack at block level.

It is nice to have a heading block in bold font weight while its preheadings, postheading, and content, except titles, are in normal font weight. Attention is drawn to that one thing that leeds the others.

The 2 "paragraphs" below the heading should somehow stand out than the paragraphs that follows it, including this. Those 2 are postheadings.

The paragraphs up to this very one, all 4 of them, should have a different style to the next 2 paragraphs. These are plain paragraphs, the nexts are preformatted paragraphs.

This preformatted paragraph 
is okay if, and only if, each 
line has two charactas than the 
previous line. Skip any mispeling
Since a preformatted paragraph must respect the preformattings, a scrollbar should be welcomed should in case the line is beyond the viewport width.

So far, you've seen 2 segments of a section. The segment that contains the headings, and the one that contain these paragraphs up to the next paragraph.

Before the upcoming 2 subsections, you should see the remaining 7 segments of this root section despite being empty. One, the custom segment, should not have a label, but others should.

 

 

 

 

 

 

The coming of the first subsection

For each section, you should be able to tell its level and position at any viewport.

When using awo, look at the tier system at the start of the hgroup segment which, as you scroll downwards, will stick to top of the viewport.

The tier can be up to six levels, heading levels. Before it is stucked, an underscore signals the no of parent sections. When stucked, total dots signals the current level that is showing. Each component, demarcated by dots, tells the no of section levels there were in the parent.

The test strategy is to have the number of subsection corresponding to the level of the main heading.

The coming of the second subsection

This illustration has 21 sections. A sum of 1 h1 section, 2 h2 sections, 3 h3 sections, 4 h4 sections, 5 h5 sections, and 6 h6 sections.

Henceforth, the sub sections will be empty but you should still tell the level and position of each.

Block Rules
  1. Balance descender and ascender space on every block.

  2. Bolden headings and titles as per leads.

  3. Revert paragraphs cum preheadings to inline-level.

  4. Create a tier system on sections. Let independent sections use bold tiers.a

  5. Prevent fieldset's title from touching the fieldset's border.

  6. Change cursor on hovering details' title.a and hang its marker to signal the title's followers.b

  7. Maintain preformatted paragraphs.

  8. Style paragraph separators.

  9. Partition windows (and sections) using borders

    Use border top because section have their differentiating side at the top.a

    Since these are demarcations, no need for the border top on the first child.b

    With the presence of a border, paddings breathe space around those demarcations.c

    But, no need for paddings on subsections (not sub segments) because they addup to the last segment.d

  10. Label parts of windows (and sections, and cards) with icons

    After stopping icons from disrupting block spacing,a reposition them into the margin area,b then stick them to the viewport.c

    The sticky position of icons for mixes should be below that of windows.d

    Each component should have unique icons.e

/* 1 */
p, pre,
summary, legend, dt, th,
h1, h2, h3, h4, h5, h6 {
  padding-block-end: var(--lh-pad);
}

/* 2 */
h1, h2, h3, h4, h5, h6,
summary, legend, dt, th
{
  font-weight: 700;
}

/* 3 */
hgroup p:has(~ :is(h1, h2, h3, h4, h5, h6)) {
  width: auto;
  display: inline-block;
  margin: 0 calc(3ch * var(--border-width) / var(--border-width)) 0 0;
}


/* 4 */

main
{
  counter-reset: h1;
}

main > section:has(h1)
{
  counter-reset: h2;
}

:where(main > section:has(h1))::before
{
  content: var(--content, counter(h1, decimal-leading-zero) "." / "");
  counter-increment: h1;
  background-color: var(--background-color);
  display: block;
}


main > section > :is(section, article):has(> hgroup > h2)
{
  counter-reset: h3;
}

:where(main > section > :is(section, article):has(> hgroup > h2))::before
{
  content: var(--content, counter(h2, decimal-leading-zero) "." / "");

  counter-increment: h2;
  padding-inline-start: 3ch;
  background-image: 
    linear-gradient(to right, currentColor 0, currentColor 2ch, transparent 2ch, transparent 3ch)
  ;
  background-size: 3ch 1px;
  background-position: 0 90%;
} 


main > section > :is(section, article) > :is(section, article):has(> hgroup > h3)
{
  counter-reset: h4;
}

:where(main > section > :is(section, article) > :is(section, article):has(> hgroup > h3))::before
{
  content: var(--content, counter(h3, decimal-leading-zero) "." / "");

  counter-increment: h3;
  padding-inline-start: 6ch;
  box-sizing: border-box;
  background-image: 
    linear-gradient(to right, currentColor 0, currentColor 2ch, transparent 2ch, transparent 3ch),
    linear-gradient(to right, currentColor 0, currentColor 2ch, transparent 2ch, transparent 3ch)
  ;
  background-size: 3ch 1px, 3ch 1px;
  background-position: 0 90%, 3ch 90%;
} 


main > section > :is(section, article) > :is(section, article) > :is(section, article):has(> hgroup > h4)
{
  counter-reset: h5;
}

:where(main > section > :is(section, article) > :is(section, article) > :is(section, article):has(> hgroup > h4))::before
{
  content: var(--content, counter(h4, decimal-leading-zero) "." / "");

  counter-increment: h4;
  padding-inline-start: 9ch;
  background-image: 
    linear-gradient(to right, currentColor 0, currentColor 2ch, transparent 2ch, transparent 3ch),
    linear-gradient(to right, currentColor 0, currentColor 2ch, transparent 2ch, transparent 3ch),
    linear-gradient(to right, currentColor 0, currentColor 2ch, transparent 2ch, transparent 3ch)
  ;
  background-size: 3ch 1px, 3ch 1px, 3ch 1px;
  background-position: 0 90%, 3ch 90%, 6ch 90%;

} 


main > section > :is(section, article) > :is(section, article) > :is(section, article) > :is(section, article):has(> hgroup > h5)
{
  counter-reset: h6;
}

:where(main > section > :is(section, article) > :is(section, article) > :is(section, article) > :is(section, article):has(> hgroup > h5))::before
{
  content: var(--content, counter(h5, decimal-leading-zero) "." / "");

  counter-increment: h5;
  padding-inline-start: 12ch;
  background-image: 
    linear-gradient(to right, currentColor 0, currentColor 2ch, transparent 2ch, transparent 3ch),
    linear-gradient(to right, currentColor 0, currentColor 2ch, transparent 2ch, transparent 3ch),
    linear-gradient(to right, currentColor 0, currentColor 2ch, transparent 2ch, transparent 3ch),
    linear-gradient(to right, currentColor 0, currentColor 2ch, transparent 2ch, transparent 3ch)
  ;
  background-size: 3ch 1px, 3ch 1px, 3ch 1px, 3ch 1px;
  background-position: 0 90%, 3ch 90%, 6ch 90%, 9ch 90%;
} 


main > section > :is(section, article) > :is(section, article) > :is(section, article) > :is(section, article) > :is(section, article):has(> hgroup > h6)
{
  counter-reset: h7;
}

:where(main > section > :is(section, article) > :is(section, article) > :is(section, article) > :is(section, article) > :is(section, article):has(> hgroup > h6))::before
{
  content: var(--content, counter(h6, decimal-leading-zero) "." / "");

  counter-increment: h6;
  padding-inline-start: 15ch;
  background-image: 
    linear-gradient(to right, currentColor 0, currentColor 2ch, transparent 2ch, transparent 3ch),
    linear-gradient(to right, currentColor 0, currentColor 2ch, transparent 2ch, transparent 3ch),
    linear-gradient(to right, currentColor 0, currentColor 2ch, transparent 2ch, transparent 3ch),
    linear-gradient(to right, currentColor 0, currentColor 2ch, transparent 2ch, transparent 3ch),
    linear-gradient(to right, currentColor 0, currentColor 2ch, transparent 2ch, transparent 3ch)
  ;
  background-size: 3ch 1px, 3ch 1px, 3ch 1px, 3ch 1px, 3ch 1px;
  background-position: 0 90%, 3ch 90%, 6ch 90%, 9ch 90%, 12ch 90%;
} 


:is(section, article)::before 
{
  font-family: monospace;
  font-size: .7em;
  position: sticky;
  top: 0;
  background-repeat: no-repeat;
  display: block;
  z-index: 1;
}

/* 4a */
article::before {
  font-weight: bold;
}


/* 5 */
legend
{
  margin-inline: -.5ch 0;
  padding-inline: .5ch;  
}

/* 6 */
summary
{
  /* 6a */
  cursor: pointer;

  /* 6b */
  list-style-position: outside;
}

/* 7 */
pre
{
  font-family: monospace;
  overflow-x: auto;
}

/* 8 */
hr
{

  height: 0;

  border: none;
  border-block-end: 1px solid;
  border-color: color-mix(in srgb, currentColor 50%, transparent 100%);

  margin-block: calc(2 * var(--line-lead));
}


/* 9 */

*:has(~ main), main, main ~ *,
:is(section, article):has(> hgroup) > *
{

  /* 9a */
  border-block-start: 
    calc(1px * var(--border-width))
    solid
    var(--border-color)
  ;

  /* 9c */
  padding-block: calc(1 * var(--line-lead) * var(--border-width) / var(--border-width));
}

/* 9d */
:is(section, article):has(> hgroup)
{
  padding-block: 0;
}

/* 9c */
:is(*:has(~ main), main, main ~ *):first-child,
:is(*:has(~ hgroup), hgroup, hgroup ~ *):first-child
{
  border-block-start: none;
}


/* 10 */

:where(
  nav,
  form,
  main,
  aside,
  header,
  footer,
  search,
  article,

  figure, 
  address,
  blockquote, 
  a:has(:is(p, pre))[href],
  del:has(:is(p, pre)),
  ins:has(:is(p, pre)),
  map:has(:is(p, pre)),
)::before
{
  content: var(--content, "");

  display: block;
  font-size: .7em;
  width: 1em;
  height: 1em;
  mask-size: cover;
  mask-repeat: no-repeat;
  background-color: currentColor;

  /* 10a */
  margin-top: -1em;
  
  /* 10b */
  transform: translate(-1.4em, 1em);

  /* 10c */
  position: sticky;

  /* 10d */
  top: 2.5em;
}

/* 10d */
:is(*:has(~ main), main, main ~ *)::before
{
  top: 1em;
}


/* 10e */

main::before 
{
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22icon%20icon-tabler%20icons-tabler-outline%20icon-tabler-square%22%3E%3Cpath%20stroke%3D%22none%22%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3Cpath%20d%3D%22M3%203m0%202a2%202%200%200%201%202%20-2h14a2%202%200%200%201%202%202v14a2%202%200%200%201%20-2%202h-14a2%202%200%200%201%20-2%20-2z%22%20%2F%3E%3C%2Fsvg%3E");
}

aside::before 
{
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22icon%20icon-tabler%20icons-tabler-outline%20icon-tabler-border-corner-square%22%3E%3Cpath%20stroke%3D%22none%22%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3Cpath%20d%3D%22M4%2020v-15a1%201%200%200%201%201%20-1h15%22%20%2F%3E%3C%2Fsvg%3E");
}

header::before 
{
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22icon%20icon-tabler%20icons-tabler-outline%20icon-tabler-bell-ringing%22%3E%3Cpath%20stroke%3D%22none%22%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3Cpath%20d%3D%22M10%205a2%202%200%200%201%204%200a7%207%200%200%201%204%206v3a4%204%200%200%200%202%203h-16a4%204%200%200%200%202%20-3v-3a7%207%200%200%201%204%20-6%22%20%2F%3E%3Cpath%20d%3D%22M9%2017v1a3%203%200%200%200%206%200v-1%22%20%2F%3E%3Cpath%20d%3D%22M21%206.727a11.05%2011.05%200%200%200%20-2.794%20-3.727%22%20%2F%3E%3Cpath%20d%3D%22M3%206.727a11.05%2011.05%200%200%201%202.792%20-3.727%22%20%2F%3E%3C%2Fsvg%3E");
}

footer::before
{
  mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5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ggZD0iTTE0IDN2NGExIDEgMCAwIDAgMSAxaDRtMCAxMHYxYTIgMiAwIDAgMS0yIDJIN2EyIDIgMCAwIDEtMi0ydi0xbS0yLTRoM200LjUgMGgzbTQuNSAwaDMiLz48cGF0aCBkPSJNNSAxMFY1YTIgMiAwIDAgMSAyLTJoN2w1IDV2MiIvPjwvc3ZnPg==");
}


map:has(:is(p, pre))::before
{
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22icon%20icon-tabler%20icons-tabler-outline%20icon-tabler-photo%22%3E%3Cpath%20stroke%3D%22none%22%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3Cpath%20d%3D%22M15%208h.01%22%20%2F%3E%3Cpath%20d%3D%22M3%206a3%203%200%200%201%203%20-3h12a3%203%200%200%201%203%203v12a3%203%200%200%201%20-3%203h-12a3%203%200%200%201%20-3%20-3v-12z%22%20%2F%3E%3Cpath%20d%3D%22M3%2016l5%20-5c.928%20-.893%202.072%20-.893%203%200l5%205%22%20%2F%3E%3Cpath%20d%3D%22M14%2014l1%20-1c.928%20-.893%202.072%20-.893%203%200l3%203%22%20%2F%3E%3C%2Fsvg%3E");
}

del:has(:is(p, pre))::before {
  mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbm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
{
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22icon%20icon-tabler%20icons-tabler-outline%20icon-tabler-location%22%3E%3Cpath%20stroke%3D%22none%22%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3Cpath%20d%3D%22M21%203l-6.5%2018a.55%20.55%200%200%201%20-1%200l-3.5%20-7l-7%20-3.5a.55%20.55%200%200%201%200%20-1l18%20-6.5%22%20%2F%3E%3C%2Fsvg%3E");
}

address::before
{
  mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgY2xhc3M9Imljb24gaWNvbi10YWJsZXIgaWNvbnMtdGFibGVyLW91dGxpbmUgaWNvbi10YWJsZXItYWRkcmVzcy1ib29rIj48cGF0aCBzdHJva2U9Im5vbmUiIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMjAgNnYxMmEyIDIgMCAwIDEgLTIgMmgtMTBhMiAyIDAgMCAxIC0yIC0ydi0xMmEyIDIgMCAwIDEgMiAtMmgxMGEyIDIgMCAwIDEgMiAyeiIgLz48cGF0aCBkPSJNMTAgMTZoNiIgLz48cGF0aCBkPSJNMTMgMTFtLTIgMGEyIDIgMCAxIDAgNCAwYT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vg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22icon%20icon-tabler%20icons-tabler-outline%20icon-tabler-quotes%22%3E%3Cpath%20stroke%3D%22none%22%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3Cpath%20d%3D%22M4%2012c-1.333%20-1.854%20-1.333%20-4.146%200%20-6%22%20%2F%3E%3Cpath%20d%3D%22M8%2012c-1.333%20-1.854%20-1.333%20-4.146%200%20-6%22%20%2F%3E%3Cpath%20d%3D%22M16%2018c1.333%20-1.854%201.333%20-4.146%200%20-6%22%20%2F%3E%3Cpath%20d%3D%22M20%2018c1.333%20-1.854%201.333%20-4.146%200%20-6%22%20%2F%3E%3C%2Fsvg%3E");
}

a:has(:is(p, pre))[href]::before
{
  mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgY2xhc3M9Imljb24gaWNvbi10YWJsZXIgaWNvbnMtdGFibGVyLW91dGxpbmUgaWNvbi10YWJsZXItbGluayI+PHBhdGggc3Ryb2tlPSJub25lIiBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTkgMTVsNiAtNiIgLz48cGF0aCBkPSJNMTEgNmwuNDYzIC0uNTM2YTUgNSAwIDAgMSA3LjA3MSA3LjA3MmwtLjUzNCAuNDY0IiAvPjxwYXRoIGQ9Ik0xMyAxOGwtLjM5NyAuNTM0YTUuMDY4IDUuMDY4IDAgMCAxIC03LjEyNyAwYTQuOTcyIDQuOTcyIDAgMCAxIDAgLTcuMDcxbC41MjQgLS40NjMiIC8+PC9zdmc+");
}

search::before {
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22icon%20icon-tabler%20icons-tabler-outline%20icon-tabler-search%22%3E%3Cpath%20stroke%3D%22none%22%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3Cpath%20d%3D%22M10%2010m-7%200a7%207%200%201%200%2014%200a7%207%200%201%200%20-14%200%22%20%2F%3E%3Cpath%20d%3D%22M21%2021l-6%20-6%22%20%2F%3E%3C%2Fsvg%3E");
}

form::before {
  mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgY2xhc3M9Imljb24gaWNvbi10YWJsZXIgaWNvbnMtdGFibGVyLW91dGxpbmUgaWNvbi10YWJsZXItY3JvcC0xNi05Ij48cGF0aCBzdHJva2U9Im5vbmUiIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNNCA4bTAgMmEyIDIgMCAwIDEgMiAtMmgxMmEyIDIgMCAwIDEgMiAydjRhMiAyIDAgMCAxIC0yIDJoLTEyYTIgMiAwIDAgMSAtMiAtMnoiIC8+PC9zdmc+");
}

Mixes

Mixes use all-round borders to define the boundary of their content — their mix of some title blocks, of any paragraph blocks, and of any mixes.

The border infers an inline padding to breathe space for content, and to create a margin area for markers of child mixes. This inline padding is balanced by the margin block start of the leading content and margin block end of the trailing content.

Most cards, cards without titles, except general cards, are iconified for distinction to similar cards like it were for windows.

The other cards, cards with titles or captions, including other mixes with titles, are partitioned like windows.

List layers use markers to identify their items. Ordered Lists use decimal leading zero, Unordered Lists use squares, definition lists use circles, Menu List use discs.

Illustration testing Mixes
Mix styles in the wild

Starting from the inline end of the title, a line runs, turn down, runs, turn right, runs, turn up, runs, turn left, and runs, around the content, to the inline start of the title.

With those lines, browser stylesheets ensure that a fieldset element contains its mix of content with a visible boundary.

Like browser stylesheets, most classless stylesheets use the same styles. Great!

Unfortunately, that style, the ability to see the borders of a mix of content is limited to only fieldset element. Some extended it to details element, like new.css and water.css, but none extended it to all mixes until Base.css.

With all mixes having borders, to visualize the boundary of their content, there's a need to test for space consistency with paragraph blocks — the sibling blocks of a mix.

It takes 3 samples of components to test for space consistency for all 2 boundary scenarios: a paragraph block, this paragraph, which has no borders; a fieldset card, which has partial borders because the title dissallows a full border at block start; and any other block, since they have all-round borders.

Fieldset title

This fieldset after a pararaph tests for the space between a no-border component and a partial-border component — one of two the boundary scenarios.

Besides, there's a test for a demarcation between the title and the content.

Details title

This details after a fieldset tests for the space consistency between two component with adjacent no-borders — two of the two boundary scenarios.

Besides, there's a test for a demarcation between the title and the content.

While testing for space consistency, we've provided 2 cases to test for demarcations within mixes. The other mixes worth demarcating are Figures, Tables, and Description Lists.

This caption is at the start of a figure. There should be a clear demarcation from the content it describes.

This caption is at the end of a figure. There should be a clear demarcation from the content it describes.

You should read a caption without having to scroll. If this table has no scrollbar, meaning you can't test the statement, force it. Force a scrollbar by reducing the viewport width untill one shows up.

1 2 3 4 5 6 7 8 9 10 11 12 13

Empty column should be visible without a stress. There's one after this column.

Similarly, empty row should be visible without a stress. There's one after this row.

The 4 parts of a table, this table, should be clearly demarcated. For example, with thicker lines.

 

 

 

 

 

 

 

 

Unlike caption, where its content should fit a viewport, content of a cell, or a span of cells, may spread across multiple viewports and that's unfortunately okay. Like this very paragraph

A dl item with 3 dd items:

 

 

You should be able to tell that this is the third of the dd items in this dl item.

Like dl, there are 3 other list layers. Marker type distinguishes them.

  1. ol, no matter how deep, should use an unlimited list-type value. Like decimal; Unlike lower-roman.

    1. ol, no matter how deep, should use an unlimited list-type value. Like decimal; Unlike lower-roman.

  • ul, menu, and dl, all lists with items in no particular order, no matter how deep, should use unique shapes for markers.

    • ul, menu, and dl, all lists with items in no particular order, no matter how deep, should use unique shapes for markers.

    • ul, menu, and dl, all lists with items in no particular order, no matter how deep, should use unique shapes for markers.

      • ul, menu, and dl, all lists with items in no particular order, no matter how deep, should use unique shapes for markers.

    List style type

    ul, menu, and dl, all lists with items in no particular order, no matter how deep, should use unique shapes for markers.

    List style type

    ul, menu, and dl, all lists with items in no particular order, no matter how deep, should use unique shapes for markers.

    The remaining mixes, mixes with no titles, no captions, no items, but not the custom card like this very card containing this paragraph, should be distinguishable even when with empty content. There are 7 below.

     

     

     

     

     

     

     

    Mixes Rules
    1. Use borders to mark the boundaries of all mixes.

      With the presence of borders, add padding inline for space at inline ends,a

      Then, margin block of double --line-lead since border conceal ascender and descende space.b The margin block on paragraphs act as padding block for the mix.

      Redeclare: display of block to target transparent mixes;c text-decoration of none for del and ins elements;d and color for a elements.e

      For any second mix in a row, 2 bordered components, except fieldset whose title is not bordered, the margin top, for separation, is a triple --line-lead.f

      For dl, a padding top compensates the lack of a paragraph's margin top.g

    2. Position icons of mixes in the margin area of the mixes' parent, right under that of segments which is, also, under that of landmarks.

    3. Partition cards

      Separate caption from content in a figure.a

      Separate title from content in a fieldset or details.b

      Separate multiple titles and descriptions, respectively, in items of description layers.c

      Separate caption, heads, bodies, foots, and cells in a table layer.

    4. Style list layers

      Provide space to accomodate 3 digit markers.a

      Apply: decimal-leading-zero to ol, square to menu, disc to ul, and circle to dl.b

      Make marker size smaller to content size.c

    /* 1 */
    ul,
    ol,
    dl,
    menu,
    figure, 
    dialog,
    address,
    details,
    fieldset, 
    blockquote, 
    a:has(:is(p, pre)),
    del:has(:is(p, pre)),
    ins:has(:is(p, pre)),
    map:has(:is(p, pre))
    {
      border: 
        calc(1px * var(--border-width))
        solid
        var(--border-color)
      ;
    
      /* 1a */
      padding-inline: calc(2 * var(--line-lead) * var(--border-width) / var(--border-width));
    
      /* 1b */
      margin-block: calc(2 * var(--line-lead));
    
      /* 1c */
      display: block;
    
      /* 1d */
      text-decoration: none;
    }
    
    dialog {
      margin: auto;
    }
    
    dialog::backdrop {
      background-color: color-mix(in srgb, currentColor 20%, transparent 100%);
      backdrop-filter: blur(1em);
    }
    
    
    /* 1d */
    :is(
      ul,
      ol,
      dl,
      menu,
      table,
      figure, 
      address,
      details,
      fieldset,
      blockquote, 
      a:has(:is(p, pre)),
      del:has(:is(p, pre)),
      ins:has(:is(p, pre)),
      map:has(:is(p, pre)),
    ) + 
    :is(
      ul,
      ol,
      dl,
      menu,
      table,
      figure, 
      address,
      details,
      blockquote, 
      a:has(:is(p, pre)),
      del:has(:is(p, pre)),
      ins:has(:is(p, pre)),
      map:has(:is(p, pre)),
    ) 
    {
      margin-block-start: calc(3 * var(--line-lead));
    }
    
    /* 1f */
    :is(p, pre) + fieldset:has(> legend)
    {
      margin-block-start: calc(1 * var(--line-lead));
    }
    
    /* 1g */
    dl
    {
      padding-block-start: var(--line-lead);
    }
    
    /* 2 */
    :is(
      figure, 
      address,
      blockquote, 
      a:has(:is(p, pre)),
      del:has(:is(p, pre)),
      ins:has(:is(p, pre)),
      map:has(:is(p, pre)),
    )::before
    {
      transform: translate(-3.2em, 1em);
      top: 4em;
    }
    
    
    /* 3a */
    
    figcaption:first-child
    {
      border-block-end: 1px solid var(--border-color);
    }
    
    figcaption:last-child
    {
      border-block-start: 1px solid var(--border-color);
    }
    
    
    /* 3b */
    legend,
    details[open] > summary
    {
      border-block-end: 
        calc(1px * var(--border-width))
        solid
        var(--border-color)
      ;
    } 
    
    
    /* 3c */
    
    dt:not(:last-of-type)
    {
      background-image: 
        linear-gradient(to right, var(--border-color) 0, var(--border-color) 2ch, transparent 2ch, transparent 3ch)
      ;
      background-size: 1ch 1px;
      background-position: left bottom;
      background-repeat: no-repeat;
    }
    
    dd
    {
      border-block-start: calc(1px * var(--border-width)) solid var(--border-color);
      margin-block-start: calc(1 * var(--line-lead) * var(--border-width) / var(--border-width));
    }
    
    
    /* 3d */
    
    table
    {
      border-collapse: collapse;
      width: 100%;
      display: block;
      overflow: auto;
      margin-block: calc(2 * var(--line-lead));
    }
    
    caption
    {
      display: block;
      border: 1px solid var(--border-color);
      text-align: start;
      position: sticky;
      left: 0;
    }
    
    thead
    {
      border-block-end: calc(var(--border-width) * 2px) solid var(--border-color);
    }
    
    tfoot
    {
      border-block-start: calc(var(--border-width) * 2px) solid var(--border-color);
    }
    
    th, td
    {
      border: calc(var(--border-width) * 1px) solid var(--border-color);
    }
    
    th
    {
      padding-block: calc(1 * var(--line-lead)) calc((1 * var(--line-lead)) + var(--lh-pad));
    }
    
    td 
    {
      vertical-align: top;
    }
    
    
    /* 4a */
    ol, 
    ul, 
    dl,
    menu 
    {
      padding-inline-start: calc(3ch * var(--border-width) / var(--border-width));
    }
    
    
    /* 4b */
    
    ol {
      list-style-type: decimal-leading-zero;
    }
    
    menu
    {
      list-style-type: square;
    }
    
    ul {
      list-style-type: disc;
    }
    
    dl > div
    {
      display: list-item;
      list-style-type: circle;
    }
    
    /* 4c */
    ::marker
    {
      font-size: .75em;
    }
    

    Phrases

    Form phrases maintain their dimension within a line. Specifically, their block dimension within a line height to avoid line overflow. All except textarea forms which are, by semantics, multi-line forms. With borders, forms distinguish their input areas within a block.

    Text Forms, like Picker Forms, use icons for labelling and consistency.

    Beside Form Phrases are Media Phrases. Media Phrases can be Text Media or Object Media.

    Except image media with a height of 16, a height to keep images flow inline with font size — like icons, object media use a block layout for maximum viewing experience.

    Text Media phrasing computer outputs need a monospace typeface to preserve any space sensitivity. Other phrases inherit the block's typeface.

    General Text, General code, and Text Media targeting machines and programs need no distinction from others. Those targeting humans do.

    For unique styles, other Text Phrases use icons to delimit inline sides except for the following phrases with common styles:

    • strong, like other leads, use a bold weight.

    • mark related a highlights with a background color

    • del relate a deleted text with a line through.

    • ins signals inserted text with a solid underline

    • abbr relate an abbreviation with a dotted underline

    • var relate a variable with an italic font style.

    • sub relate a subscript with a reduced font size at the baseline

    • sup relate a superscript with a reduced font size at the capline

    • small relate an aside content with a redued font size

    • q and ruby maintain their quotes and positioning styles.