Unordered list
- First list item
- Second list item
- Third list item
Lightweight CSS framework
MiddleClass is a lightweight, classless-first CSS framework for semantic static websites. This page starts with a practical tour of the framework and ends with a separate regression-testing area.
Download the stylesheet, copy it into your project, and serve it alongside your own HTML and other static assets. Keeping a local copy makes the site independent of a CDN and lets you decide when to adopt future MiddleClass updates.
<link rel="stylesheet" href="/assets/middleclass.css">
Link the file from the document head before any project-specific stylesheet that should override its defaults. MiddleClass is plain CSS, so there is no package manager, build step, preprocessor, or JavaScript dependency to install or maintain. Start with semantic HTML, then add the small set of layout and component classes only where they are useful.
Ordinary semantic elements receive readable defaults without component classes.
A short quotation demonstrates the default blockquote treatment.
Inline code, keyboard input such as Ctrl + S, sample output such as Build complete, highlighted text, and an CSS abbreviation receive useful defaults.
Small text follows the browser's normal semantics, while muted text uses the framework's secondary color.
<article class="reading-width">
<h1>Example article</h1>
<p>Readable content with ordinary HTML.</p>
</article>
The public layout classes handle width, spacing, wrapping, columns, and logical alignment.
.container centers content within a responsive maximum width. .reading-width limits long-form text without centering it automatically.
MiddleClass adds a small presentation layer where semantic HTML alone cannot express the intended treatment.
Outline Secondary outline Documentation
A card provides a contained surface with padding, a border, and rounded corners.
Continue to formsThis is an ordinary block-style disclosure using native details and summary elements.
The same native disclosure behavior can present an overlaid link list. Alignment and opening direction are explicit modifiers.
:root {
--mc-chevron-down: var(--mc-chevron-down-font-awesome);
--mc-dropdown-chevron: var(--mc-chevron-down);
}
Native fields and controls share consistent sizing, spacing, borders, focus treatment, and disabled states.
Tables use readable defaults, while .table-wrap provides horizontal scrolling when the content is wider than the viewport.
| Project | Owner | Status | Updated |
|---|---|---|---|
| Alpha | Jordan | Complete | July 28 |
| Beta | Morgan | In progress | July 30 |
| Gamma | Taylor | Planned | August 2 |
This paragraph comes immediately before a heading.
The heading's top margin creates stronger separation from the preceding paragraph, while its bottom margin controls the space before this text.
The heading's top margin creates the separation after the list.
| Element | Spacing owner |
|---|---|
| Table | Bottom margin |
The heading's top margin creates the separation after the responsive table wrapper.
Visible rhythm is easier to judge when several semantic relationships appear together.
The heading's top margin creates the separation after the figure.
The padded disclosure controls the space at its inner edges.
The heading's top margin creates the separation after the disclosure.
The heading's top margin creates the separation after the form.
This paragraph follows a thematic break, which intentionally uses equal space above and below.
The component padding should be the only spacing source at the top and bottom edges.
The first and last child margins should not add to the card padding.
The final paragraph should not add extra space below the disclosure padding.
This long link should wrap rather than force the page to overflow: https://example.com/releases/middleclass/0.4.0/documentation/very-long-static-site-example
example-command --with-a-very-long-option-name --and-another-long-option=value
The repository contains focused guides for the framework's design, API, customization, accessibility, sizing, and spacing policies.