SuperMinimalDemoSite

SuperMinimalCSS

This article was originally written by Mike Mai, the creator of SuperMinimalCSS.

Read the original article on the original page.

Retrieved on September 3, 2025

Table of Contents

About

Super­Minimal­CSS is pure black & white CSS awesomeness with nice typography (for both English and Chinese). Less is more is the main principle of this mini design system.

Super­Minimal­CSS’s design guidelines.
Colors
Classes
Gradients
Animations
Breakpoints
Custom fonts
Auto dark mode
Hover & focus styles
Auto high contrast mode
Fluid typography & spacing
Under 15KB minified file size
Browser zoom & font-size compatibility

⚠ Fair warning: this pen is constantly being updated and using logical CSS that might not have good browser support.


Foundations

The system is built on a small set of design tokens.

Color (or lack thereof)
TokenLight Mode ValueDark Mode ValueDescription
--color-text#202020#f0f0f0The page text color.
--color-bg#f4f4f4#090909The page background color.

Everything is black and white. Actually, off-black and off-white because the strong contrast of true black and white will hurt your eyes. You are welcome.

There are only 2 tokens: page text color and page background color. The two colors are basically the opposite of each other, which means high contrast. Each element is colored with considerations to that relationship.

Spacing
TokenValueDescription
--gutterScale from 1ch to 3chThe inline spacing base and the grid gutter.
--stackScale from 1.25ex to 1.75exThe block spacing base and the default paragraph spacing.
--line-length70chThe optimal line length for reading.
--page-padding-inlineScale from 10vw to whatever is available after subtracting the optimal line length of 70ch from 100% viewpoint widthThe inline inset spacing of a single-column page layout.

Spacing is fluid. It scales with viewport and character width horizontally; it scales with viewport and x-height vertically. This approach allows any System UI font to have unique spacing.

There is no range of spacing tokens, only the base ones. For each use case, spacing is calculated using the base tokens.

Typography
TokenValueDescription
--fontSystem UI SansThe sans-serif font for heading and body text.
--font-italicGeorgiaThe classic font is used solely for blockquotes and italic text (because italic sans-serif is ugly).
--font-codeSystem UI MonospaceThe monospace font for code text.
--font-size100%The root font-size of a page.

System UI fonts are applied to optimize performance and the heading hierarchy is defined by the browser defaults.

The root font-size is fluid, which allows all text to scale with viewport.


Elements

Some of the most used html elements designed in black & white.

Inline Text

There are various ways to style text: emphasis (italic), strong emphasis (bold), link, abbr, code, key, superscript, subscript, small, and quote.

Details and Summary

You are looking at it. This is the details and you just clicked summary to expand it.

Blockquote

Simplicity is the ultimate sophistication.

— Leonardo da Vinci
Code Block
// This is a block of code.
pre { display: block; }
Description List
Beast of Bodmin
A large feline inhabiting Bodmin Moor.
Morgawr
A sea serpent.
Owlman
A giant owl-like creature.
Un-ordered List
Ordered List
  1. This is a list item.
  2. This is 1st level.
    1. This is 2nd level.
      1. This is 3rd level.
      2. This is 3rd level.
    2. This is 2nd level.
  3. This is a list item.
Figure
Placeholder
Fig 1: This figure has an image and figcaption.
Table
Table caption.
Top HeadingTop HeadingTop HeadingTop HeadingTop HeadingTop Heading
Side HeadingCellCellCellCellCellCell
Side HeadingCellCellCellCellCellCell
Footer Side HeadingFooter cellFooter cellFooter cellFooter cellFooter cellFooter cell
Form Elements
This is a fieldset
  1. ⚠ Error: please enter a valid email.
  2. ⚠ Error: please enter a valid email.
  3. ↑ Note: plain text and HTML are allowed.

This is another fieldset
This is yet another fieldset

Headings

This is H2

This is H3

This is H4

This is H5
This is H6
Skip link

Hard refresh the page and hit the tab key. Skip link must be the first child of the <body> element.


Add-ons

The add-ons contain the most common layouts. Data attributes are required for styling.

You may say, Isn’t this cheating? Using attributes for styling is not so different than using classes. Well, yes. That’s why I call these add-ons. They are optional.

Flag
Placeholder

Flag: image on the left and text on the right

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Beatae cupiditate, praesentium ducimus necessitatibus tenetur molestias est fuga consequuntur maiores.

Grid
Placeholder Placeholder Placeholder Placeholder Placeholder Placeholder
Page layout

The current page is a single column page layout with header and footer. Header and footer are pushed against the top and bottom of the page respectively, regardless of how tall the main content is. Page content has a max width of 75 characters, which is the optimal line length.