Sub topic 13
Checking your groupings with the squint test
This chapter assumes you know the proximity principle, the spacing scale from earlier chapters, and how padding, margin and gap work. It also assumes you have seen the text-spacing overrides from the accessibility chapter. Here you use all of that to check a finished page.
What the squint test checks
The squint test checks whether a page's structure survives without its details. Squint at the page, or blur it, until you can't read the text. What remains is the pattern of dense areas and empty areas. If that pattern matches the groups you meant to create, the spacing is doing its job.
Text, borders and colors can hide spacing mistakes. A heading with a bold label looks like it belongs to its section even when the gaps around it are equal. Blurring removes those cues, so only distance is left.
Running the test
You can do this without tools by leaning back from the screen and half-closing your eyes. For a repeatable check, add a temporary blur in the browser's developer tools:
body {
filter: blur(6px);
}Remove it when you finish. Don't ship it.
Follow these steps:
- Blur the page and count the clusters you see.
- Compare that count with the groups you intended: sections, cards, fieldsets.
- Look for blobs that merge and gaps that are too even.
- Fix the spacing, then blur again.
What to look for
Most failures fall into a few patterns.
| What you see when blurred | Likely cause | Fix |
|---|---|---|
| One uniform gray block | Every gap uses the same value | Use larger tokens between groups than within them |
| A label that sticks to the previous field | Label margin is larger above than below | Make the label-to-input gap the smallest in the form |
| Cards that touch each other | Spacing was set with margin on some children but not others | Use `gap` on the grid or flex container |
| Two sections that look like one | Section spacing is only slightly larger than the paragraph spacing | Widen the gap by at least one step on the scale |
| A heading floating midway between two blocks | Equal space above and below the heading | Put less space below the heading than above it |
A useful rule is that each level of grouping should be clearly larger than the one inside it. If you can't see the difference between two levels when blurred, move one of them at least one step on the scale. Small differences, such as 1rem against 1.5rem, often disappear in a blur.
Test beyond one setup
A page that passes at your desktop width can fail elsewhere, so repeat the test in these conditions:
- A narrow viewport, where
clamp()values shrink and groups may crowd together. - A wide viewport, where the cards may spread so far apart that they stop reading as a set.
- With user text-spacing overrides applied, using this test stylesheet:
* {
line-height: 1.5 !important;
letter-spacing: 0.12em !important;
word-spacing: 0.16em !important;
}
p {
margin-bottom: 2em !important;
}These values come from WCAG 1.4.12. Under them, text grows and paragraph gaps widen, so a gap that separated two groups may now equal the gap inside one. If clusters merge, the structure depended on spacing that users can override. Fix it with larger group gaps or with a visible cue such as a heading or rule.
Recording what you find
Write down each issue with the element, the symptom, and the token you changed. When the same token causes repeated problems, adjust the scale itself instead of patching individual rules. For example, if --space-3 and --space-4 are indistinguishable when blurred, they are too close, and one of them should move.
Exercise
You blur a signup form and see one even column of equal-sized blobs. Every field and every group uses gap: var(--space-3). What do you change, and how do you check it worked?
Show answer
Use three levels of spacing: a small gap between a label and its input (for example --space-1), a medium gap between fields (--space-3), and a larger gap between groups (--space-5). Blur the form again. You should now see separate clusters, one per group, with tighter pairs inside each cluster. Then apply the text-spacing test stylesheet to confirm the groups still read as groups.
Exercise
A page looks well grouped at 1440px wide. At 360px wide, the blurred page shows no gap between the last card and the next section. Name one likely cause and one fix.
Show answer
A likely cause is that the section spacing uses a fixed small value, or that a clamp() minimum is too small, so it shrinks to match the card gap. The fix is to raise the clamp minimum for the section token so it stays at least one step larger than the card gap.