Consolidate typography into a shared @utility type scale#19289
Consolidate typography into a shared @utility type scale#19289jeffmerrick wants to merge 3 commits into
Conversation
Extract the base-element and utility CSS shared by the docs and marketing bundles into _base-shared.scss and _utilities-shared.scss. Replace the legacy text-heading-* / text-body-* font-size tokens with composable Tailwind v4 @Utility blocks (heading-1..6, heading-xl, body-sm..2xl, font-overline, font-overline-sm) that bundle size, weight, family, letter-spacing, and line-height. Refactor _templates.scss onto the new utilities, drop the redundant section-header-* / section-body-* / section-hint-small mixins, add a shared @mixin edge-fade to dedupe the carousel gradient masks, and migrate raw CSS values to design tokens (text-gray-primary, border-gray-300, bg-violet-50, rounded-2xl, etc.). Update marketing layouts that depended on the old bundle-local heading rules to use heading-xl / heading-1 / body-xl / font-overline explicitly. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Pre-merge Review — Last updated 2026-05-20T19:35:18ZTip Summary: This is a CSS/typography refactor that extracts shared Review confidence:
Investigation log
🔍 Verification trail5 claims extracted · 3 verified · 0 unverifiable · 0 contradicted
🚨 Outstanding in this PRNo outstanding findings in this PR.
|
|
Your site preview for commit 13b7ae8 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-19289-13b7ae8f.s3-website.us-west-2.amazonaws.com |
Lighthouse Performance ReportCommit: 13b7ae8 | Metric definitions
|
Would love to see what this looks like, as I'm a fan of consistency. Would it make sense to do here, or separately as a follow-up? |
Removes the docs-specific h1-h6 px-based sizing and font declarations, letting the global base styles cascade through. Docs headings now use the same responsive scale as the rest of the site, with only docs-specific behavior (scroll offset, margins, sibling spacing) explicitly declared. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
@cnunciato Let's give it a try! I just pushed that up. The main difference is that the headings are now a little bigger on desktop compared to the previous sizes and responsive. |
Drop the lg: step from the shared heading/body type scale, reduce top margins on template page containers at mobile widths, and trim gaps in hero, card-grid, and feature-split partials. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Reworks global marketing typography to be slightly smaller and use one consistent typographic scale with more responsive breakpoints. Also refactors
_templates.scssto use the new styles as well as general cleanup. The docs typographic scale wasn't touched but could be modified to use this scale as well if desired.The new classes aren't applied everywhere and some pages will still have manual Tailwind font sizes applied that we'll need to fix as we come across them. But any raw headings, etc. will get the styles.
Includes some other miscellaneous updates and tweaks in files I was touching.
Resolves: #19139
Generated description of changes:
Summary
main.scss) and marketing (_marketing.scss) bundles into two new partials —theme/src/scss/_base-shared.scssandtheme/src/scss/_utilities-shared.scss— so both bundles ship the same preflight overrides, custom-element resets, heading defaults, and a single canonical type scale.text-heading-*/text-body-*font-size tokens with composable Tailwind v4@utilityblocks:heading-1–heading-6,heading-xl,body-sm–body-2xl,font-overline, andfont-overline-sm. Each utility bundles size, weight, family, letter-spacing, and line-height so templates no longer hand-wire those properties._templates.scssonto the new utilities, drops the now-redundantsection-header-*,section-body-*, andsection-hint-smallmixins, adds a shared@mixin edge-fadeto dedupe the carousel/swiper gradient masks, and migrates raw CSS values (hex colors, px sizes, inlineborder: 0.5px solid …) over to design-token utilities (text-gray-primary,border-gray-300,bg-violet-50,rounded-2xl, etc.).layouts/product/superintelligence-infrastructure.html,layouts/page/pricing.html,layouts/page/demo.html,layouts/partials/contact-us.html,layouts/whitepapers/*,layouts/case-studies/*,layouts/what-is/single.html, and the template partials) to useheading-xl/heading-1/body-xl/font-overlineexplicitly.gray-200, heroh1/h2/h3collapsed to a single rule, demo page switched fromflexto a 2-col grid, badge separator swapped for a phosphor caret, event breadcrumb trimmed, neo and homepage hero titles converted to the split-title (primary/secondary) form.Test plan
make lintpassesmake buildproduces no Tailwind / Sass errors/product/neo,/product/secrets-management,/product/superintelligence-infrastructure,/pricing,/demo,/contact-us,/what-is/<page>,/case-studies(list + single),/whitepapers(list + single)/eventslist and a single event page (breadcrumb, timing-info grid on mobile + desktop, speakers card, learn list, registration card, cloud-notice callout).page-heroacross breakpoints🤖 Generated with Claude Code