Sub topic 9
Combining size, contrast, and position without competing emphasis
This chapter assumes you know basic HTML and CSS, including custom properties. It also assumes you have read the earlier chapters on size, the type scale, contrast, WCAG ratios, and position. Here you will combine those cues and learn why adding more emphasis often makes a page weaker.
Emphasis is a budget
Each cue (size, contrast, position, weight, color, spacing) tells the reader that an element matters. A cue only works by comparison, so an element is emphasized only relative to what surrounds it. If everything is large, saturated, and placed at the top, nothing stands out.
Treat emphasis as a limited budget:
- Each view should have one primary element. A view is whatever is on screen without scrolling.
- Each view can have a few secondary elements that support the primary one.
- Everything else is background and should stay quiet.
A useful rule of thumb is that a view should have one clear first read, a short list of second reads, and a calm remainder. Designers check this by asking, "If a user could look at only one thing here, which would it be, and is that the thing I want?"
How cues add up
Cues stack. A heading that is large, dark on a light background, and placed top-left gets strong emphasis from three sources. A designer rarely needs all three at full strength. Often one dominant cue and one or two supporting cues are enough.
| Cue | What it changes | Typical cost when overused |
|---|---|---|
| Size | Area and scale step | Pushes other content down, causes wrapping and scrolling |
| Contrast | Value, color, or weight difference from surroundings | Visual noise, harsh pages, accessibility problems if low-contrast text is used for de-emphasis |
| Position | Distance from the first-read area (top, left in left-to-right languages) | Only one element can occupy the best spot |
| Weight | Stroke thickness | Many bold items flatten the page |
| Whitespace | Isolation from neighbors | Too much separates related items |
Two consequences follow from this table.
- Cues are interchangeable up to a point. A small element with very high contrast, such as a bright badge on a gray card, can outrank a larger low-contrast element. You can lower one cue if another is carrying the emphasis.
- Cues conflict when they point at different elements. If the largest element is in one place, the highest-contrast element is in another, and the top-left element is a third, the eye has no clear first stop.
Recognizing competing emphasis
These are the errors you will see most often in reviews.
- Two primary buttons. Two filled, saturated buttons side by side ask the user to choose between equal options. Usually one action is the one you want.
- A loud banner above a loud headline. A full-width colored promo bar at the top of the page takes the best position and the highest contrast. The page's real heading then comes second.
- Everything bold. If labels, values, and headings are all bold, weight no longer tells you anything.
- Decorative contrast. A bright illustration, gradient, or photo can outweigh text because images have high saturation and large area. Check whether the image should be the primary element.
- Too many type sizes. Using seven or eight unrelated sizes makes it unclear which sizes mean "heading" and which mean "just different".
- Color used as the only cue. Red text for "important" fails for color-blind users and fails in grayscale. Pair color with size, weight, or position.
A worked example: a hero section
A hero is the top block of a landing page. It usually has a headline, a short supporting sentence, a main action, and a lower-priority action. The markup keeps this order, which matters later for source order.
<section class="hero">
<div class="hero__text">
<h1>Plan your week in five minutes</h1>
<p class="hero__lead">Drag tasks onto a calendar and see conflicts before they happen.</p>
<p class="hero__actions">
<a class="button button--primary" href="/signup">Start free</a>
<a class="button button--secondary" href="/tour">Take the tour</a>
</p>
<p class="hero__note">No credit card needed.</p>
</div>
<img class="hero__image" src="calendar.png" alt="A weekly calendar with color-coded tasks">
</section>Now assign each element a role in the budget.
| Element | Role | Size | Contrast | Position |
|---|---|---|---|---|
| `h1` | Primary | Largest step | Near-black on white | Top of the text column, left |
| `.hero__lead` | Secondary | Base size or one step up | Dark gray | Directly under heading |
| Primary button | Secondary (the action) | Base size | Filled, saturated | After the lead text |
| Secondary button | Tertiary | Base size | Outline only | Beside the primary button |
| `.hero__note` | Background | Small | Muted but passing | Below the buttons |
| Image | Supporting | Large area | Moderate | Right column |
The CSS follows from the table.
:root {
--step-0: 1rem;
--step-1: 1.25rem;
--step-4: 2.441rem;
--ink: #1a1a1a;
--muted: #595959;
--accent: #0b57d0;
}
body {
font-family: system-ui, sans-serif;
font-size: var(--step-0);
line-height: 1.5;
color: var(--ink);
background: #ffffff;
margin: 0;
padding: 2rem;
}
.hero {
display: grid;
gap: 1rem;
align-items: center;
}
@media (min-width: 48rem) {
.hero {
grid-template-columns: 2fr 1fr;
gap: 2rem;
}
}
.hero h1 {
font-size: clamp(1.75rem, 1.2rem + 2.5vw, 3rem);
line-height: 1.15;
margin: 0 0 0.5rem;
}
.hero__lead {
font-size: var(--step-1);
color: var(--muted);
margin: 0 0 1.5rem;
}
.hero__actions {
display: flex;
gap: 0.75rem;
margin: 0 0 0.75rem;
}
.hero__note {
font-size: 0.875rem;
color: #767676;
margin: 0;
}
.hero__image {
width: 100%;
height: auto;
}
.button {
padding: 0.6rem 1.2rem;
border-radius: 4px;
font: inherit;
cursor: pointer;
text-decoration: none;
}
.button--primary {
background: var(--accent);
color: #ffffff;
border: 2px solid var(--accent);
font-weight: 700;
}
.button--secondary {
background: transparent;
color: var(--accent);
border: 2px solid var(--accent);
font-weight: 400;
}Notes on the choices:
- Only the
h1uses the large step. The lead text is one step up from body text, so the heading clearly outranks it. - The two buttons share size, shape, and hue. They differ only in fill and weight, so the difference reads as "main action versus alternative", not "two unrelated things".
- The muted gray
#767676is about the lightest gray that still meets the 4.5:1 minimum for normal text on white. De-emphasis must not drop below that threshold, or you have traded hierarchy for an accessibility failure. - The image takes a large area but has no extra contrast treatment such as a border or shadow, so it does not compete with the heading.
A decision flow for each view
You can apply the budget with a short loop. Run it on any section of a page.
Techniques for lowering emphasis
Beginners often add emphasis to the important element. It is usually faster and cleaner to remove emphasis from the competing ones.
- Drop a size step. Move a rival element down one step on your type scale, not to an arbitrary value.
- Reduce weight. Change
font-weightfrom 700 to 400 or 500 for labels and metadata. - Soften value, not below the minimum. Use a mid-gray for supporting text, but verify the ratio. For text, aim for at least 4.5:1. For large text and for UI component boundaries, WCAG asks for at least 3:1.
- Remove fill. Turn a filled control into an outline or a text link.
- Move it. Place tertiary links in a footer, a menu, or the end of a row.
- Use fewer colors. Keep one accent color for the primary action and avoid reusing it for decoration.
Edge cases
- Dark mode. Contrast relationships invert. A white button on a dark page can look more dominant than the same button did on a light page. Re-check the squint test in each theme, and verify ratios again.
- Error and success messages. A red alert banner is meant to take priority. Let it, but make it temporary or dismissible so it does not permanently outrank the page heading.
- Multiple equal choices. Pricing tables often have three similar plans. Pick one to recommend (a border, a badge, or a filled button) and keep the others uniform. If you truly have no recommendation, keep all three equal and let the heading carry the emphasis.
- Long pages. Each section needs its own primary element, but sections should not all shout equally. Use the same heading size for the same level and vary emphasis through content, not through ever-bigger headings.
- Hover and focus states. A hover effect that makes a secondary button suddenly filled can make it equal to the primary. That is acceptable as feedback while it is active, but keep it from changing size, which causes layout shifts.
- Animation. Motion is a very strong cue. A looping animation near the heading will outrank almost any static emphasis, so use it sparingly and respect
prefers-reduced-motion.
Summary of the approach
Choose the primary element first. Give it one dominant cue and a couple of supporting ones. Quiet everything else by reducing size, contrast, or weight, never below accessible thresholds. Then test by squinting, and fix whichever element ranks higher than it should.
Exercise
A pricing page has a large, saturated green "Buy now" button in the header, a bold red "Sale ends today" banner above the heading, and a hero heading in a medium size. The heading is meant to be the primary element, but reviewers say they look at the banner first. Name two cues that explain this, and give two changes that move the emphasis back to the heading without making the banner text fail contrast requirements.
Show answer
The banner wins on position (it sits above everything) and on contrast (saturated red with bold weight), and the heading is relatively small, so size does not help it. Two fixes: increase the heading to a higher step on the type scale and reduce the banner's weight and size, and change the banner to a calmer treatment such as a light tinted background with dark text that still meets 4.5:1. Moving the banner below the heading or making it dismissible also works. The "Buy now" button should be an outlined or smaller control until the user reaches the section that needs it.
Exercise
You have a card with a title, a price, a description, a "Add to cart" button, and a "Save for later" link. Assign each a role (primary, secondary, tertiary, or background) and state which cue you would use to express that role.
Show answer
A reasonable answer: the price or title is primary (largest size and darkest text, positioned at the top of the card). Pick one, since two primaries would compete. The "Add to cart" button is secondary and uses a filled, high-contrast style. The description is background text in base size with a muted but passing gray. "Save for later" is tertiary, shown as a text link or outline with lower weight placed next to or below the button. Any assignment is acceptable if it gives one clear first read and uses distinct cues for each level.