Skip to content

[React Doctor] Collapsed w-N h-N to size-N across 8 files#430

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
react-doctor/2026-05-30/arch-tailwind-size-shorthand
Open

[React Doctor] Collapsed w-N h-N to size-N across 8 files#430
github-actions[bot] wants to merge 1 commit into
mainfrom
react-doctor/2026-05-30/arch-tailwind-size-shorthand

Conversation

@github-actions

@github-actions github-actions Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

Collapsed w-N h-N to size-N across 8 files — Tailwind v3.4 single-axis shorthand for square sizing, identical CSS output

The size-N utility ships both width and height from one token, so w-3 h-3size-3 and h-[18px] w-[18px]size-[18px] produce byte-identical CSS. The rule only fires when both axes match (w-1/2 won't collapse; responsive prefixes suppress it).

Changes



Note

Low Risk
Cosmetic class renames only; no logic, APIs, or asymmetric sizing changes.

Overview
This PR replaces paired equal width/height Tailwind classes with size-* across eight files in the e2e app, marketing site, and website-v2 UI kit. Examples include w-12 h-12size-12, h-3 w-3size-3, and arbitrary squares like h-[18px] w-[18px]size-[18px].

Touches are limited to className strings on demo fixtures (gradient/animated/zero-size boxes), icons (GithubButton, ViewDocsButton), collapsible chevrons, chart legend swatches, navigation menu indicator diamonds, homepage tooltip carets, and mobile demo placeholders/arrows. Rendered layout should be unchanged; only class lists are shorter.

Reviewed by Cursor Bugbot for commit a1bd406. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Collapsed paired Tailwind width/height utilities into size-* across 8 files to remove redundancy with no visual changes. This uses tailwindcss v3.4 shorthand for square elements.

  • Refactors
    • Replaced w-N h-N and h-[Npx] w-[Npx] with size-N / size-[Npx] in icons, indicators, and animated elements.
    • Output CSS and behavior are unchanged.
    • Applied only when width and height match; responsive or asymmetric cases were not changed.

Written for commit a1bd406. Summary will update on new commits.

Review in cubic

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions github-actions Bot added the react-doctor Opened by react-doctor label May 30, 2026
@vercel

vercel Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-grab-storybook Ready Ready Preview, Comment May 30, 2026 3:43pm
react-grab-website Ready Ready Preview, Comment May 30, 2026 3:43pm

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

Labels

react-doctor Opened by react-doctor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants