This is the landing page of Stashling, the sample site for this course, at 1280 pixels wide. Stashling is an invented open-source backup tool. Look at the whole page for a few seconds before you read on.

Figure 1: the landing page at the start of the course. Everything asks for attention at the same strength.
Nothing on this page is broken. Every link works, and the text is clear. But a visitor would say that everything looks equally important, so they don’t know where to start, and the page looks like a long list.
This module explains why a page looks like that, and fixes the landing page with five small CSS changes. You’ll learn how the eye decides what to look at first, how it joins items into groups, and why lines that start in the same place are easier to read.
After this module, you can:
- run a blur check on any page and say what it shows and what it can’t show
- make one element the clear first stop on a page with size, weight, color or space, and calm the elements around it
- group related items with three cues (distance, look and a shared box), and say why the ratio of two gaps matters more than their size
- put a page on one shared left edge, and say when centered text is fine
To follow along, copy the module-00 folder of the course repository, github.com/vespaiach/web-design-course, and open index.html in a browser. There’s no build step.
Where your eye lands first on the landing page
Pause and predict: look at Figure 1 again for three seconds, then look away. Which element did you see first? Which part of the page did you see as one block?
Answer
You probably saw the photo first, because it’s the largest area with strong color. The black header and footer come next. The four blue buttons read as one strip, and none of them stands out from the other three.
The title is only 6 px larger than the body text (24 px against 18 px). The bold line under it has the same weight, so the title is easy to miss. The next section shows a way to check this without trusting a three-second glance.
Blur the page to see what it puts first
Designers check a page by squinting at it or by blurring it. The squint test is a check where you blur a page until you can’t read the words, then look at what’s left. You can do it in any browser. Open DevTools on the landing page and add this rule to html in the Styles pane:
html {
filter: blur(5px);
}
Figure 2 shows the landing page with that rule.

Figure 2: blurred, the photo and the button strip win, and the title is one gray line among many.
The blur removes fine detail and keeps large shapes: dark and light areas, blocks of color and the gaps between them. That’s the part of a page that decides what stands out and what belongs together. Research on scene recognition found that a coarse view of large blobs can start recognition before the details are processed (Schyns and Oliva, 1994). But later work found that people use coarse or fine detail depending on the task, so “the brain sees the blurred page first” is too strong (Hegdé, 2008).
So treat the blur as a quick look at the large shapes. It doesn’t tell you whether the words work, whether small items line up, or what happens on hover. We found no study that tests the squint test as a design method, so it’s a convention.
The blur radius is a convention too. Try 3 to 6 px, and check the phone width as well, because the shapes change when the layout stacks.
Rule: If the blurred page has no clear first shape, the page has no clear first stop.
Why four equal buttons cancel each other
The landing page has a title, a tagline, a description, four buttons and a photo, all near the top. Each one is bold, large or colored. Visual hierarchy is the arrangement of elements so the eye takes them in order of importance (NN/g, 2021). The landing page has no such order, and research on visual search explains why.
Salience is how strongly an element draws the eye by how it looks, before the viewer chooses where to look. Wolfe and Horowitz list the attributes that guide attention without doubt: color, motion, orientation and size (2017). An element is salient when it differs from its neighbors, and when those neighbors are alike. Figure 3 shows both halves of that rule.
Figure 3: the same dark circle stands out among alike circles and hides among different ones.
That’s the reason behind the advice “if everything is bold, nothing stands out”. Each extra bold or colored element makes the rest of the page less alike, so every emphasized element gets weaker. The four blue buttons are the clearest case on the landing page. Each one is a strong difference from the text around it, but they’re identical to each other, so the eye sees one strip and no first choice.
The fix starts with the primary action. A primary action is the one action the page most wants a visitor to take. On a download page for a free tool, that’s “Download 2.4”, so it stays a filled button. The other three actions become plain links, which are still easy to find but no longer compete.
Pause and predict: in Figure 4, only the hero buttons change. Which version tells you what to do first, and does the title look any stronger even though it didn’t change?


Figure 4: four equal buttons (top) and one primary action with three links (bottom). Only the buttons changed.
In the bottom version the button is the only blue area in the hero, so it’s the first stop after the title. The title didn’t change, but it now has one fewer competitor at the same strength.
The CSS keeps the existing .button class for the download link. The three other links get a new link class with an underline, because without it they look like plain text. The four items share one row with a flex gap:
.hero-actions {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: baseline;
gap: var(--space-inside);
}
align-items: baseline puts the link text on the same baseline as the button text, so the row reads as one line. justify-content: center keeps the row centered for now, as the rest of the page is; a later step removes it.
The value of the gap lives in tokens.css as --space-inside: 16px. A design token is a named design value, such as a size or a color, stored in one place and used by name everywhere else. In this course the tokens are CSS custom properties in tokens.css.
Module 2 turns these first values into a full spacing scale. But a token costs one more name to learn, so a value used only once doesn’t need one.
Rule: Give each page one primary action, and make the other actions look alike and quieter.
But equal buttons are right when the choices are equal. The download section has Linux, macOS and Windows buttons. A visitor needs exactly one of them, and the page can’t know which, so they stay alike.
Size, weight and color for the title
The title is the second problem. It’s 24 px, the tagline under it is bold, and the description is the same black as both. You can make the title stronger in two ways: make it bigger, or make everything around it quieter. The design book Refactoring UI has a section on the second way, titled “De-emphasize to emphasize” (Wathan and Schoger).
Pause and predict: Figure 5 shows the hero three times. The middle version changes only the title size. The bottom version keeps the title size and changes only the text under it. Which change moves your eye to the title more?



Figure 5: the same hero before (top), with a larger title (middle), and with quieter text under the title (bottom). Both changes help, in different ways.
The larger title works through size, one of the attributes in Wolfe and Horowitz’s list. A difference must be “large enough” to stand out, and 24 px against bold 18 px text is a small one. The paper gives no number for a web page, so we picked 40 px by eye. Module 4 replaces it with a type scale.
The quieter text works through the second half of the salience rule. The tagline loses its bold and the description turns gray. Now the elements around the title are more alike and less strong, so the title wins without growing.
Font weight isn’t on Wolfe and Horowitz’s list. But a heavier weight makes each letter’s strokes thicker, so the word is darker over its area, and our reading is that weight works through that darkness. That’s our inference, and we found no study that tests it.
The lab uses both changes. In CSS, the title size comes from a token and a class-scoped rule:
.hero h1 {
font-size: var(--size-title);
}
.muted {
color: var(--color-muted);
}
The rule targets .hero h1, so other h1s keep their size. Refactoring UI has a section titled “Separate visual hierarchy from document hierarchy”. The heading level says what the content is, and the class says how strong it looks.
The base styles show the cost of tying them together. There, h3 is 18 px, the same as body text, so a card title looks no larger than the text under it.
Gray text has a floor. A contrast ratio is the WCAG number that compares how light a text color and its background are.
WCAG 2.2 requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text, and 4.499:1 fails (Understanding SC 1.4.3). The token --color-muted is #555, which is 7.46:1 on white. This script computed it, with the WCAG 2 relative luminance formula:
// WCAG 2 contrast ratio of a gray against white. Run with: node contrast.mjs
const lum = (hex) => {
const [r, g, b] = hex.match(/\w\w/g).map((h) => {
const c = parseInt(h, 16) / 255;
return c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
});
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
};
const ratio = (a, b) => (Math.max(lum(a), lum(b)) + 0.05) / (Math.min(lum(a), lum(b)) + 0.05);
for (const gray of ['555555', '767676', '999999']) console.log(`#${gray} on #ffffff: ${ratio(gray, 'ffffff').toFixed(2)}:1`);
#555555 on #ffffff: 7.46:1
#767676 on #ffffff: 4.54:1
#999999 on #ffffff: 2.85:1
A light gray such as #999 looks calm, but it fails. Module 6 teaches contrast in full. For now, check every gray you use for text.
NN/g suggests a few limits for hierarchy: at most three type sizes on a page, at most two large elements, and at most three levels of contrast (2021). No study backs those numbers, so use them as starting points.
Space is the fourth tool. Material Design 3 recommends giving the most important content “generous spacing” (Spacing). In this module, the title gets space through the larger size and its own margins, and a later step adds space between sections.
Rule: To make one element stronger, make it larger, or make its neighbors quieter.
Hierarchy has two limits. First, salience is one of five things that guide the eye, and the others include what the visitor is looking for (Wolfe and Horowitz, 2017). A visitor who came to find the price looks for the price, whatever you made large.
Second, content can win over the design. A strongly colored photo can take the first look away from the title, as the hero photo does in the blurred page.
How the eye groups items
The landing page also has a grouping problem. To see it, look at how the eye joins separate items without being told.
The psychologist Wertheimer described this in 1923 (English translation). The Gestalt principles of grouping are the rules he and later researchers found for which separate items the eye sees as one group. This module uses three of them.
- Proximity: items that are closer to each other than to their neighbors form a group.
- Similarity: items that look alike (same color, size or shape) form a group.
- Common region: items inside one shared area, such as a box or a background, form a group.
Figure 6 shows the three cues on the same row of eight dots. The first row has no cue, so it reads as one row.
Figure 6: the same eight dots with no cue, then grouped by proximity, by similarity and by common region.
Proximity depends on relative distance. Kubovy, Holcombe and Wagemans measured how strongly dots group by proximity (1998). The strength depended on the relative distance, the ratio of the gaps, and the rule held when they changed the scale of the whole display.
In Figure 6, row 2 uses gaps of 16 inside and 48 between, a ratio of 3. Suppose you use 10 px inside a group and 10 px between groups. That’s a ratio of 1, and it gives the eye no grouping signal at all.
The cues add up. Kubovy and van den Berg found that the effect of proximity and similarity together equals the sum of their separate effects (2008). So two cues that point the same way make a stronger group, and a cue that points the other way weakens it.
But the principles are “all else being equal” rules. A review of a century of this research says they break easily outside the simple displays they were found in. In richer scenes, the cues interact in ways that are hard to predict (Wagemans et al., 2012).
So there’s no fixed ranking of the cues. In experiments, a box usually beats a gap, and a gap usually beats color, but none always wins.
Blue headings look like links
Similarity is the first cue to fix on the landing page. Every h2 is pure blue, #0000ff. The buttons are light blue, the button hover color is that same #0000ff, and so is one of the feature icons. On a page where blue means “you can click this”, blue headings join the clickable group.
NN/g recommends one color for every clickable item, and warns against decorative elements in the clickable color (2020). It’s a recommendation, partly backed by NN/g’s own usability studies.
Pause and predict: in Figure 7, only the color of the two headings changes. In which version do the headings look like part of the content below them?


Figure 7: blue headings (top) look like links, and black headings (bottom) look like part of their section. Only the color changed.
The CSS change is one deleted line in base.css. The h2 rule keeps its size and loses color: #0000ff, so headings get the text color. This changes the h2s on the other three pages too, for the same reason.
The feature icons are a similarity problem as well. They’re 24, 48, 32 and 40 px, with four different strokes, and one is blue. Module 8 fixes the icons.
Rule: Give one look to one meaning. If blue means “click”, nothing else is blue.
A heading belongs to the content below it
Proximity is the next fix. A section heading should sit closer to its own content than to the section before it. Run this in the DevTools console on the landing page to measure the space around the second heading:
const box = (el) => el.getBoundingClientRect();
const h2 = document.querySelectorAll("h2")[1];
const above = box(h2).top - box(document.querySelector(".features")).bottom;
const below = box(document.querySelector(".stats")).top - box(h2).bottom;
console.log(Math.round(above), Math.round(below));
Pause and predict: the heading “Trusted by people who hate losing files” sits between the feature cards and the row of numbers. Is it closer to the cards above it or to the numbers below it?
In one run in Chrome 157 at 1280 px, it printed 17 17. Your numbers may differ by a pixel.
The heading is exactly as far from the cards as from its own content, a ratio of 1, so it belongs to neither. Both gaps come from the browser’s default margins. Nobody chose them.
The fix adds space above every section except the first:
section + section {
margin-top: var(--space-between);
}
The token --space-between is 48 px, three times --space-inside. The section’s top margin collapses with the heading’s own top margin and with the bottom margin of the content before it, so the larger value wins. The same console code now prints 48 17. Figure 8 shows the difference.


Figure 8: with 17 px above and below (top), headings float between sections. With 48 px above and 17 px below (bottom), each heading belongs to its section.
This ratio is the bridge to Module 2, which builds a full spacing scale on the same idea. But proximity has one cost on small screens. When a layout stacks, two items that sat side by side can end up far apart, so check the phone width after any spacing change (NN/g, 2020).
Rule: Space between groups must be clearly larger than space inside them. About three times is a good start.
Boxes group more strongly than gaps
The feature cards already use the third cue. Each card has a 1 px black border, so its icon, title and text form one group. That works even though the gap between cards (10 px) equals the padding inside them (10 px).
Without the borders, those four cards would have the same ratio-1 problem as the headings. Row 4 of Figure 6 shows the effect alone: the same dots and gaps, with only a box added.
Palmer named common region in 1992. In his displays it strongly influenced grouping and could overcome proximity and similarity (Palmer, 1992). His paper also says that the smallest region dominates, and that regions can nest. So a card inside a panel reads as its own unit first.
A box is strong, and that’s also its cost, because every border adds lines the eye must process. NN/g notes that borders add clutter, and that full-width colored bands can make visitors think the page has ended (2020). Refactoring UI suggests trying more space, a background color or a shadow before a border. The lab keeps the card borders, and Module 2 revisits the gap and padding inside the cards.
Rule: Use a box when space alone cannot show the group, and use the lightest box that works.
One left edge for the whole page
The last problem is edges. Alignment is placing items so that their edges sit on one shared line.
On the landing page, every section is centered with text-align: center. Each line of text starts at a different place, so the page has no edge for the eye to follow. Figure 9 shows the difference with gray bars in place of text.
Figure 9: centered lines start in six places; left-aligned lines share one edge.
Two reasons support a shared left edge. First, edges that line up form a line that the eye can follow, which Wertheimer listed as grouping by direction.
The second reason is where people look. People who read left to right look mostly at the left side of the screen. In NN/g’s 2017 eyetracking study with more than 120 participants on desktop screens, about 80% of the points where people’s eyes rested were on the left half (Fessenden, 2017). On sites in right-to-left languages, the pattern mirrors.
We found no controlled reading study that compares centered and left-aligned web text. So “left-align body text” is a convention that scanning studies support, and no reading-speed study we found tests it.
Pause and predict: in Figure 10, only the centering changes. Where does your eye start each section in each version?


Figure 10: centered (top), each section starts somewhere new; left-aligned (bottom), the logo, title, headings and text share one edge.
The CSS change is mostly deletions. Every text-align: center in index.css goes, and .hero-actions loses justify-content: center.
The numbers in .stats used justify-content: space-around, which spreads them across the width. They now sit together from the left, with column-gap: var(--space-between) between them. Without text-align, text falls back to the initial value, start, which is the left edge in English and the right edge in a right-to-left page.
Centering is fine for content that is one short line, such as a button label. It also suits a single short title when nothing else on the page lines up with it. But the cost shows on text of more than one line and on lists, which get a ragged left edge.
Rule: Give a page one left edge, and center only short single lines.
Choices and costs
Each problem in this module has more than one fix. This table lists the main choices, what each costs, and when to choose another one.
| Decision | Choice | Cost or limit | Choose something else when |
|---|---|---|---|
| Make one element stronger | Larger size | Takes space, and pushes content down on a phone | The element is already large, or space is short |
| Make one element stronger | Heavier weight | A small difference; bold everywhere cancels it | Many elements are already bold |
| Make one element stronger | Quieter neighbors (regular weight, gray) | Gray text has a contrast floor of 4.5:1 | The neighbors are content the visitor needs to read first |
| Make one element stronger | More space around it | Costs height on the page | The page is a dense tool, such as a table |
| Group items | Proximity (gaps) | Can break when a layout stacks on a phone | Groups must stay clear at every width; add a box |
| Group items | Similarity (same look) | Uses up a look; blue cannot mean “click” and “heading” | The look already has a meaning on the page |
| Group items | Common region (box or background) | Adds lines and clutter; bands can look like the page end | Space alone shows the group |
| Text alignment | Left edge (start) | A short hero can look plain | The content is one short line, and centering looks calmer |
| Text alignment | Centered | Ragged left edge on multi-line text and lists | The content is more than one line, or a list |
What changed recently in CSS
Baseline is the status MDN shows for how well a feature works across the major browsers: widely available, newly available or limited. All statuses below are from the web-features data (version 3.46.0) and MDN, read on 2026-11-18.
gapin flex layout, used in this lab for the hero links and the numbers, is Baseline widely available. It became available in all major browsers on 2021-04-26 and widely available on 2023-10-26.subgridlines up items inside sibling cards (for example, every card title on one line). It became newly available on 2023-09-15 (Chrome 117, Firefox 71, Safari 16) and is Baseline widely available since 2026-03-15. This lab doesn’t need it.text-box: trim-both cap alphabetictrims the extra space above and below a line of text, so text lines up with images and box edges. It shipped in Chrome and Edge 133, Safari 18.2 and Firefox 154, and MDN markstext-box-trimas Baseline 2026, newly available since August 2026. The web-features data still markstext-boxas limited, because it lacks Firefox data for thecapandalphabetickeywords. Module 2 discusses it.- Chrome DevTools added the Blurred vision emulation in Chrome 83 (What’s New in DevTools, Chrome 83).
The other features in this lab have worked in all major browsers for years. filter is Baseline widely available (since 2019-03-07). font-size, font-weight, color and margin are long-standing. Custom properties and the + combinator are Baseline widely available too.
Online tools for this step
These tools do this module’s two jobs: blurring a page, and marking up a screenshot for a critique. The browser’s own DevTools do the first job without any other tool.
- Chrome DevTools, Blurred vision. In Chrome or Edge, open the Command Menu (Cmd+Shift+P or Ctrl+Shift+P), run “Show Rendering”, and choose Blurred vision under “Emulate vision deficiencies” (docs). It blurs the live page in place, and the same menu also simulates reduced contrast and four kinds of color blindness. Limits: only Chromium-based browsers, a fixed blur strength, and no side-by-side view. Firefox’s Accessibility Inspector simulates color blindness and contrast loss but has no blur, so in Firefox you add
filter: blur(5px)tohtmlin the Rules view (docs). - Excalidraw. A whiteboard where you paste a screenshot and draw boxes, arrows and notes on it, then export PNG or SVG. It is open source under the MIT license, and the free plan keeps one scene in your browser’s storage. Excalidraw+ ($6 per user per month, pricing) adds cloud saving, more scenes and comments. DevTools can capture a screenshot of a node, an area or the full page, but can’t mark it up.
- tldraw. A whiteboard with a media tool (Cmd+U) for inserting an image, plus arrows, text and sticky notes. It works without an account, and sharing a board needs one. Its page lists no pricing or limits for the web app.
Check yourself
Critique: the backup list nobody reads
A backup dashboard shows the last 12 backups as a list. Every row has a red icon, a bold title and its own box with a border and a shadow. Ten rows say “Backup finished” and two say “Backup failed”.
The rows are 8 px apart, and each box has 8 px of padding. Users say they miss the failed backups. What is wrong, and what would you change?
Hint 1
Look at what the two failed rows have that the ten finished rows don’t have.
Hint 2
Compare the gap between rows with the padding inside each row. Then count how many boxes the eye has to process.
Answer
The failed rows look like the finished rows, with a red icon, a bold title and a box.
Salience needs a difference from the neighbors, and neighbors that are alike. But here every row is emphasized, so nothing stands out. Make the ten finished rows quiet: a gray icon and regular weight. Keep red and bold for the two failed rows only.
The boxes add little. Every row has one, so the boxes group nothing that the rows don’t already group, and twelve borders and shadows add clutter. Use one box around the whole list, or none.
The 8 px gap equals the 8 px padding, a ratio of 1, which is one more reason the rows blur together. If you want groups, put the failed backups in their own group at the top, with a clearly larger gap before the finished ones.
Review questions
- In Figure 2, what can the blurred page tell you, and what can it not tell you?
- A page has six bold headings and one primary action, a link in bold text. Why does the bold do little for the primary action?
- Cards have 12 px of padding and 12 px of gap between them, and no borders. What grouping signal does the eye get, and what would you change?
- A page uses blue for links and also for every section heading. Which grouping principle causes the problem?
- When is centered text a good choice, and when does it cost the reader?
Answers
- It shows the large shapes: what stands out first and which areas read as groups. It can’t judge the words, the alignment of small items, or states such as hover.
- Salience needs a difference from neighbors that are alike. With six bold headings around it, bold is no difference. So make the primary action different in another way, such as a filled button, more space or a larger size, or make the headings quieter.
- None. The ratio of the gaps is 1, so the content of each card is as close to the next card as to itself. Make the gap between cards clearly larger than the padding (about three times), or add a box to each card.
- Similarity. Items that look alike form a group, so the headings join the links, and visitors may try to click them.
- Centering is fine for one short line, such as a button label or a short title. But on text of more than one line and on lists, every line starts at a different place, so the reader has no edge to follow.
The lab: give the landing page an order
In about 15 minutes, you’ll apply the five changes from this module to the landing page. Start from a copy of module-00, keep index.html open in a browser, and reload after each step. The finished files are in the module-01 folder of the course repository.
Step 1: start the token file
Why: every new value in this module gets a name in one place, so later modules can change it once.
Replace the contents of tokens.css with this:
/* Design tokens: named values that the other CSS files use. */
:root {
--space-inside: 16px; /* between items of one group */
}
What you should see: nothing changes yet, because no rule uses the token.
Step 2: one primary action
Why: four equal buttons cancel each other (Figure 3). One filled button gives the page a first action.
In index.html, change the paragraph with the four hero buttons to this:
<p class="hero-actions">
<a class="button" href="#download">Download 2.4</a>
<a class="link" href="signup.html">Create an account</a>
<a class="link" href="article.html">Read the blog</a>
<a class="link" href="#features">See all features</a>
</p>
In index.css, replace the .hero .button rule (margin: 5px) with these two rules:
.hero-actions {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: baseline;
gap: var(--space-inside);
}
.link {
text-decoration: underline;
}
What you should see: one blue button and three underlined links, centered, as in the bottom of Figure 4.
Step 3: a larger title and quieter text
Why: the title needs a large difference, and its neighbors need to be calmer (Figure 5).
Add two tokens inside :root in tokens.css, after --space-inside:
--size-title: 40px; /* the one largest text on a page */
--color-muted: #555; /* secondary text: 7.46:1 on white */
In index.html, remove the <strong> tags from the tagline, and give the description the muted class:
<p>Back up your home folder to any storage you own. Free and open source.</p>
<p class="muted">Stashling copies only what changed, encrypts everything before it leaves your computer, and lets you restore any file from any day.</p>
In index.css, add this rule after the .hero rule:
.hero h1 {
font-size: var(--size-title);
}
Add this rule after the .link rule:
.muted {
color: var(--color-muted);
}
In the .quote rule, delete the line font-weight: bold;. The quote keeps its italics.
What you should see: a 40 px title, a regular-weight tagline and a gray description. The quote near the bottom is italic and no longer bold.
Step 4: headings that do not look like links
Why: blue headings join the clickable group by similarity (Figure 7).
In base.css, delete the line color: #0000ff; from the h2 rule. The rule is now:
h2 {
font-size: 20px;
}
What you should see: black section headings, on this page and on the other three pages, as in the bottom of Figure 7.
Step 5: more space between sections than inside them
Why: each heading sits as far from the section above as from its own content (Figure 8).
Add a token inside :root in tokens.css, after --color-muted:
--space-between: 48px; /* between groups: three times the space inside */
In index.css, add this rule before the .features rule:
section + section {
margin-top: var(--space-between);
}
What you should see: a clear gap above “Why Stashling?”, “Trusted by people who hate losing files” and “Download Stashling 2.4”. The console code from the proximity section prints 48 17.
Step 6: one left edge
Why: centered sections start every line in a new place (Figure 9).
In index.css:
- Delete the whole
.herorule (text-align: center). - In
.hero-actions, deletejustify-content: center;. - In
.features, deletetext-align: center;. - In
.stats, replacejustify-content: space-around;andtext-align: center;withcolumn-gap: var(--space-between);. - In
.quote, deletetext-align: center;. - Delete the whole
.downloadrule (text-align: center).
After these steps, index.css is:
.hero h1 {
font-size: var(--size-title);
}
.hero img {
width: 100%;
height: 300px;
}
.hero-actions {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: var(--space-inside);
}
.link {
text-decoration: underline;
}
.muted {
color: var(--color-muted);
}
section + section {
margin-top: var(--space-between);
}
.features {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.feature {
flex: 1 1 200px;
border: 1px solid #000;
padding: 10px;
}
.stats {
display: flex;
flex-wrap: wrap;
column-gap: var(--space-between);
font-weight: bold;
font-size: 20px;
}
.quote {
font-style: italic;
}
And tokens.css is:
/* Design tokens: named values that the other CSS files use. */
:root {
--space-inside: 16px; /* between items of one group */
--size-title: 40px; /* the one largest text on a page */
--color-muted: #555; /* secondary text: 7.46:1 on white */
--space-between: 48px; /* between groups: three times the space inside */
}
What you should see: the page in Figure 11. The logo, title, headings, card text, numbers and quote all start on one left edge.
Step 7: run the squint test again
Why: the blur checks the result the same way you checked the start.
Add filter: blur(5px) to html in the DevTools Styles pane, compare the page with Figure 2, then remove the rule.


Figure 11: the finished landing page (top) and its blurred version (bottom). The title and one button are now the first stops.
What you should see: in the blurred page, the title is the first strong shape, and the one blue button is the only color in the hero. But the photo is still large, and still stretched; Module 8 fixes the photo. At 390 px wide, the title wraps to four lines and the links wrap onto two lines, which is fine for now.
Optional: apply it to a page of your own
Pick a page you built, such as a landing page, a dashboard or a README site. Blur it with DevTools and write down the first three shapes you see. Then answer three questions:
- Which element is the primary action?
- Which heading is as far from its own content as from the section before?
- Which lines do not share an edge?
Fix one of the three, and blur the page again.
Module 1 cheat sheet
Squint test blur 3-6 px; the first strong shape = the first stop
Salience one big difference among alike neighbors; one primary action
Emphasize larger size, or quieter neighbors (gray >= 4.5:1)
Proximity gap between groups ~3x the gap inside them
Similarity one look, one meaning (blue = clickable)
Region a box groups strongly; use the lightest box that works
Alignment one left edge; center only short single lines
Tokens --space-inside 16px, --space-between 48px,
--size-title 40px, --color-muted #555
Module 2, Spacing and Rhythm, opens the settings page, where every margin is 10 px and nothing groups, and turns these first spacing tokens into a full scale.
Sources
Perception and attention:
- Wolfe and Horowitz, “Five factors that guide attention in visual search“, Nature Human Behaviour 1, 0058, 2017.
- Wertheimer, “Untersuchungen zur Lehre von der Gestalt, II”, Psychologische Forschung 4, 1923. English excerpt: “Laws of organization in perceptual forms“.
- Wagemans et al., “A century of Gestalt psychology in visual perception: I. Perceptual grouping and figure-ground organization“, Psychological Bulletin 138(6), 2012. An open-access review of the field, and a good place to start for going deeper.
- Kubovy, Holcombe and Wagemans, “On the lawfulness of grouping by proximity“, Cognitive Psychology 35, 1998.
- Kubovy and van den Berg, “The whole is equal to the sum of its parts“, Psychological Review 115(1), 2008.
- Palmer, “Common region: a new principle of perceptual grouping“, Cognitive Psychology 24(3), 1992.
- Palmer and Rock, “Rethinking perceptual organization: the role of uniform connectedness”, Psychonomic Bulletin and Review 1(1), 1994. It shows that a filled area, such as a button, reads as one unit before other grouping happens.
- Schyns and Oliva, “From blobs to boundary edges“, Psychological Science 5(4), 1994, and Hegdé’s review of coarse-to-fine processing, Progress in Neurobiology 84, 2008.
Usability research and practice:
- Kelley Gordon, on visual hierarchy, NN/g, 2021.
- Aurora Harley, NN/g, 2020, on proximity, similarity and common region.
- Therese Fessenden, on horizontal attention and the left side of the screen, NN/g, 2017.
- Kara Pernice, on four text-scanning patterns from eyetracking, NN/g, 2019. Meaningful subheadings help readers who scan headings first.
- Adam Wathan and Steve Schoger, Refactoring UI, the chapter “Hierarchy is Everything”. A paid book, cited here for what it recommends.
- Material Design 3, “Spacing” and “Grids“.
Standards and tools:
- W3C, Understanding SC 1.4.3, Contrast (Minimum), WCAG 2.2.
- MDN, “text-box-trim“, and Adam Argyle, “CSS text-box-trim“, Chrome for Developers, 2025.
- Chrome for Developers, DevTools Rendering tab effects, including Blurred vision.