Skip to content

SYL Dark: Typography (component level color)#2982

Closed
beaesguerra wants to merge 9 commits intowb-syl-dark-tokensfrom
syl-dark-typography
Closed

SYL Dark: Typography (component level color)#2982
beaesguerra wants to merge 9 commits intowb-syl-dark-tokensfrom
syl-dark-typography

Conversation

@beaesguerra
Copy link
Member

@beaesguerra beaesguerra commented Feb 27, 2026

Summary:

Exploring setting the font color at the typography component level. This causes a lot of regressions because several components were relying on the typography components inherited color behaviour (see Chromatic snapshot diffs). This would also impact existing usage in the other frontend projects. To avoid regressions, we will set the font color globally in applications and storybook so it behaves the same way as before (see #2983)

Here is an example Chromatic build that shows the regressions within WB: https://www.chromatic.com/build?appId=5e1bf4b385e3fb0020b7073c&number=8728

Issue: WB-2166

Test plan:

@changeset-bot
Copy link

changeset-bot bot commented Feb 27, 2026

🦋 Changeset detected

Latest commit: 83d4d88

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

This PR includes changesets to release 21 packages
Name Type
@khanacademy/wonder-blocks-typography Minor
@khanacademy/wonder-blocks-accordion Patch
@khanacademy/wonder-blocks-badge Patch
@khanacademy/wonder-blocks-banner Patch
@khanacademy/wonder-blocks-birthday-picker Patch
@khanacademy/wonder-blocks-button Patch
@khanacademy/wonder-blocks-cell Patch
@khanacademy/wonder-blocks-dropdown Patch
@khanacademy/wonder-blocks-form Patch
@khanacademy/wonder-blocks-icon-button Patch
@khanacademy/wonder-blocks-labeled-field Patch
@khanacademy/wonder-blocks-link Patch
@khanacademy/wonder-blocks-modal Patch
@khanacademy/wonder-blocks-pill Patch
@khanacademy/wonder-blocks-popover Patch
@khanacademy/wonder-blocks-search-field Patch
@khanacademy/wonder-blocks-tabs Patch
@khanacademy/wonder-blocks-toolbar Patch
@khanacademy/wonder-blocks-tooltip Patch
@khanacademy/wonder-blocks-date-picker Patch
@khanacademy/wonder-blocks-card Patch

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

Size Change: +39 B (+0.03%)

Total Size: 120 kB

Filename Size Change
packages/wonder-blocks-typography/dist/es/index.js 1.61 kB +39 B (+2.48%)
ℹ️ View Unchanged
Filename Size
packages/wonder-blocks-accordion/dist/es/index.js 3 kB
packages/wonder-blocks-announcer/dist/es/index.js 1.74 kB
packages/wonder-blocks-badge/dist/es/index.js 2.02 kB
packages/wonder-blocks-banner/dist/es/index.js 2.01 kB
packages/wonder-blocks-birthday-picker/dist/es/index.js 1.91 kB
packages/wonder-blocks-breadcrumbs/dist/es/index.js 755 B
packages/wonder-blocks-button/dist/es/index.js 4.26 kB
packages/wonder-blocks-card/dist/es/index.js 1.08 kB
packages/wonder-blocks-cell/dist/es/index.js 2.18 kB
packages/wonder-blocks-clickable/dist/es/index.js 2.6 kB
packages/wonder-blocks-core/dist/es/index.js 2.59 kB
packages/wonder-blocks-data/dist/es/index.js 5.48 kB
packages/wonder-blocks-date-picker/dist/es/index.js 8.06 kB
packages/wonder-blocks-dropdown/dist/es/index.js 19.7 kB
packages/wonder-blocks-form/dist/es/index.js 6.3 kB
packages/wonder-blocks-grid/dist/es/index.js 1.24 kB
packages/wonder-blocks-icon-button/dist/es/index.js 4 kB
packages/wonder-blocks-icon/dist/es/index.js 1.91 kB
packages/wonder-blocks-labeled-field/dist/es/index.js 3.47 kB
packages/wonder-blocks-layout/dist/es/index.js 1.63 kB
packages/wonder-blocks-link/dist/es/index.js 1.53 kB
packages/wonder-blocks-modal/dist/es/index.js 7.21 kB
packages/wonder-blocks-pill/dist/es/index.js 1.31 kB
packages/wonder-blocks-popover/dist/es/index.js 4.32 kB
packages/wonder-blocks-progress-spinner/dist/es/index.js 1.48 kB
packages/wonder-blocks-search-field/dist/es/index.js 1.1 kB
packages/wonder-blocks-styles/dist/es/index.js 464 B
packages/wonder-blocks-switch/dist/es/index.js 1.55 kB
packages/wonder-blocks-tabs/dist/es/index.js 5.57 kB
packages/wonder-blocks-testing-core/dist/es/index.js 3.25 kB
packages/wonder-blocks-testing/dist/es/index.js 978 B
packages/wonder-blocks-theming/dist/es/index.js 384 B
packages/wonder-blocks-timing/dist/es/index.js 1.37 kB
packages/wonder-blocks-tokens/dist/es/index.js 5.11 kB
packages/wonder-blocks-toolbar/dist/es/index.js 906 B
packages/wonder-blocks-tooltip/dist/es/index.js 6.02 kB

compressed-size-action

@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

npm Snapshot: Published

🎉 Good news!! We've packaged up the latest commit from this PR (1e88dc5) and published all packages with changesets to npm.

You can install the packages in frontend by running:

./dev/tools/deploy_wonder_blocks.js --tag="PR2982"

Packages can also be installed manually by running:

pnpm add @khanacademy/wonder-blocks-<package-name>@PR2982

@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

A new build was pushed to Chromatic! 🚀

https://5e1bf4b385e3fb0020b7073c-vbdkviktkf.chromatic.com/

Chromatic results:

Metric Total
Captured snapshots 468
Tests with visual changes 0
Total stories 828
Inherited (not captured) snapshots [TurboSnap] 0
Tests on the build 468

@beaesguerra beaesguerra changed the title SYL Dark: Typography SYL Dark: Typography (component level) Feb 27, 2026
@beaesguerra beaesguerra changed the title SYL Dark: Typography (component level) SYL Dark: Typography (component level color) Feb 27, 2026
@beaesguerra beaesguerra force-pushed the syl-dark-typography branch from 1685225 to 83d4d88 Compare March 9, 2026 21:35
@beaesguerra beaesguerra closed this Mar 9, 2026
beaesguerra added a commit that referenced this pull request Mar 11, 2026
## Summary:

Setting the font color in the Storybook environment using a token so it works with different themes. Note: We will be setting the font color at the global level in apps/storybook environments since this is how it is currently done. 

For reference, we would use the css variable token in [base-page-styles.css](https://github.com/Khan/frontend/blob/78c764bab2b54535242a2aaf7ce0f3652cfe34b8/libs/app-shell/src/styles/base-page-styles.css#L18) in `frontend` (similar to what we did in the [hackathon](https://github.com/Khan/frontend/pull/5123/changes#diff-f098b08ecc7bbe0e32ed84648793d2806edc0a08c971badb39437123579616ceR18))

Note: I explored setting the font color at the typography component level in: #2982 . (TLDR: setting the color at the typography component level will cause regressions because some things are relying on the inherited color behaviour. For now, we'll stick with how the font color is currently set up)

Issue: WB-2166

## Test plan:

- Review the typography stories and snapshots in the `syl-dark` theme
  - Typography in the catalog:`?path=/story/catalog--typography-and-icons&globals=theme:syl-dark`
  - Typography components: `?path=/docs/packages-typography--docs&globals=theme:syl-dark`
  - Typography tokens: `?path=/docs/packages-tokens-typography--docs&globals=theme:syl-dark`

Author: beaesguerra

Reviewers: beaesguerra, claude[bot], jandrade

Required Reviewers:

Approved By: jandrade

Checks: ✅ 13 checks were successful, ⏭️  3 checks have been skipped

Pull Request URL: #2983
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