Skip to content

Blankslate: make compact styling the default#4110

Draft
dylanatsmith wants to merge 2 commits into
mainfrom
dats/blankslate-size-scale
Draft

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

Conversation

@dylanatsmith

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 styling the default and drop the now-redundant responsive block.

The default Blankslate now renders with the tighter compact styling: reduced outer padding (32 -> 20), smaller heading (text-title-size-medium -> small), smaller body text (large -> medium), tightened action margins, and reduced spacious padding (80/40 -> 44/28).

Screenshots

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

Integration

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

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 presentation only below the 34rem @container breakpoint. Since the compact styling is now the intended default at all widths, I promoted those values into the base .blankslate rules and deleted the @container (max-width: 34rem) block entirely, rather than leaving a redundant override.

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?

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: 65353cb

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>
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.

1 participant