Skip to content

Blankslate: make compact styling the default#4110

Open
dylanatsmith wants to merge 5 commits into
mainfrom
dats/blankslate-size-scale
Open

Blankslate: make compact styling the default#4110
dylanatsmith wants to merge 5 commits into
mainfrom
dats/blankslate-size-scale

Conversation

@dylanatsmith

@dylanatsmith dylanatsmith commented Jun 23, 2026

Copy link
Copy Markdown
Member

What are you trying to accomplish?

Mirrors primer/react#8034 for view_components. That PR shifts the Blankslate size scale so the compact presentation becomes the default. view_components has no size prop, so the portable part of that change is: make the compact typography the default and drop the now-redundant responsive block.

The default Blankslate heading and body text now render at the smaller compact sizes (text-title-size-medium -> small for the heading, text-body-size-large -> medium for body copy). Padding, spacious padding, and action margins are unchanged from their previous defaults.

Screenshots

N/A (visual change is a typography restyle of the default; no committed Playwright snapshots exist for Blankslate to regenerate).

Integration

This restyles the default Blankslate typography everywhere it is used. No API changes, so no consumer code updates are required.

List the issues that this change affects.

N/A

Risk Assessment

  • Low risk the change is small, highly observable, and easily rolled back.
  • Medium risk changes that are isolated, reduced in scope or could impact few users. The change will not impact library availability.
  • High risk changes are those that could impact customers and SLOs, low or no test coverage, low observability, or slow to rollback.

What approach did you choose and why?

The previous CSS produced the compact typography only below the 34rem @container breakpoint. Since the compact heading and body sizes are now the intended default at all widths, I promoted those values into the base .blankslate-heading and & p rules and deleted the @container (max-width: 34rem) block entirely, rather than leaving a redundant override. I also removed several primer/spacing stylelint disable comments that the pinned @primer/stylelint-config now reports as needless.

Unlike primer/react#8034, there is no size prop, BlankslateContext, or small/medium/large scale to rescale here, and primary_action already renders a :medium button, so those parts of the upstream PR do not apply.

Anything you want to highlight for special attention from reviewers?

The scope here is narrower than the upstream React PR: only the heading and body typography become compact by default. Padding (default and spacious) and action margins are deliberately left at their existing values.

One judgement call: I marked the changeset as minor rather than major. primer/react went major because it removed the size="small" API; view_components has no such API, so this is a visual restyle with no breaking change. Happy to adjust if you would prefer a different bump.

Accessibility

  • No new axe scan violation - This change does not introduce any new axe scan violations.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews (Lookbook)
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Mirrors primer/react#8034. The default Blankslate now uses the compact
padding, heading, and body text styles, and the redundant responsive
@container block has been removed since the compact presentation it
produced is now the default.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 77a775b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/view-components Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

The pinned @primer/stylelint-config no longer flags these
spacing-token values, so the disable comments are reported as
needless.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the original default (32) and spacious (80/40) padding values;
only the heading, body text, and action margins remain compacted.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restore the original .blankslate-action margins; only the heading and
body text sizes remain compacted.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Padding and action margins were reverted, so the changeset now only
describes the heading and body text size changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the default Primer::Beta::Blankslate styling to use the “compact” typography scale by default (smaller heading and body font sizes), aligning view_components with the upstream Primer React change. It also adds a changeset entry documenting the restyle.

Changes:

  • Change the default Blankslate body text size from --text-body-size-large to --text-body-size-medium.
  • Change the default Blankslate heading size from --text-title-size-medium to --text-title-size-small.
  • Remove the previous @container (max-width: 34rem) block and add a changeset describing the update.
Show a summary per file
File Description
app/components/primer/beta/blankslate.pcss Updates default typography sizes and removes the responsive @container block.
.changeset/blankslate-size-scale.md Documents the Blankslate default typography restyle as a minor changeset.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment on lines 111 to 115
/* was .clean-background
** TO DO: deprecate this and use utility instead */
.blankslate-clean-background {
border: 0;
}
"@primer/view-components": minor
---

`Blankslate`: The heading and body text now use the smaller compact sizes by default, and the redundant responsive `@container` block has been removed since the compact typography it produced is now the default

@llastflowers llastflowers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants