Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0358d86
Add `theme` package
mirka Oct 13, 2025
0010125
Remove ts extensions
mirka Oct 13, 2025
22f281c
Handle CSS modules
mirka Oct 14, 2025
4741fc1
Update package lock
mirka Oct 14, 2025
0568c63
Allow public documentation
mirka Oct 15, 2025
24da932
Merge branch 'trunk' into theme-package
mirka Oct 15, 2025
97b0dfd
Add content to readme
mirka Oct 15, 2025
71d1f63
Lock private APIs
mirka Oct 15, 2025
fe9e740
Fix missing React error in test file
mirka Oct 15, 2025
d377c0c
Remove test for now (requires jest 30)
mirka Oct 15, 2025
d0d0242
Remove Storybook for now (punt to follow-up)
mirka Oct 15, 2025
91c4376
Remove build scripts to bin
mirka Oct 15, 2025
c144b61
Merge branch 'trunk' into theme-package
mirka Oct 16, 2025
a1c0e40
Move to prebuild folder
mirka Oct 16, 2025
67abb89
Lint all prebuild files
mirka Oct 16, 2025
54a4cb0
Move `design-tokens.ts` file to prebuild folder
mirka Oct 16, 2025
e4519e5
Fixup
mirka Oct 16, 2025
c43da33
Prebuild as part of root build process
mirka Oct 16, 2025
a89b0de
Try resolving floating point differences
mirka Oct 16, 2025
2f6f56b
Update readme
mirka Oct 17, 2025
97aa621
Remove layers from stylesheet
mirka Oct 17, 2025
a1c7b23
Merge branch 'trunk' into theme-package
mirka Oct 17, 2025
98ab6ed
Reduce color ramp tests
mirka Oct 17, 2025
2dfcd14
Move prebuild files into src (fixes types)
mirka Oct 17, 2025
815798b
Allow theme package to participate in private APIs
mirka Oct 17, 2025
ddfa586
Output combined stylesheet
mirka Oct 20, 2025
6aa7e5c
Rename prebuild to prebuilt
mirka Oct 21, 2025
cd1192c
Merge branch 'trunk' into theme-package
mirka Oct 21, 2025
d86bdeb
Merge branch 'trunk' into theme-package
mirka Oct 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update readme
  • Loading branch information
mirka committed Oct 17, 2025
commit 2f6f56b658ab0ac42ed540a98b095fe73b177cdc
30 changes: 15 additions & 15 deletions packages/theme/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,6 @@ A theming package that's part of the WordPress Design System. It has two parts:

In the **[Design Tokens Reference](docs/ds-tokens.md)** document there is a complete reference of all available design tokens including colors, spacing, typography, and more.

### Building Design Tokens

To rebuild the design tokens from source:

```bash
npm run build:tokens
```

This command will:

1. Generate primitive tokens
2. Build CSS and JavaScript token files
3. Update the design tokens documentation
4. Format all generated files

## Theme Provider

The `ThemeProvider` is a React component that should wrap your application to provide design tokens and theme context to the child UI components.
Expand Down Expand Up @@ -58,6 +43,21 @@ The provider can be used recursively to override or modify the theme for a speci

The `ThemeProvider` redefines some of the design system tokens. Components consuming semantic design system tokens will automatically follow the chosen theme. Note that the tokens are defined and inherited using the CSS cascade, and therefore the DOM tree, not the React tree. This is very important when using React portals.

### Building

This package is built in two steps. When `npm run build` is run at the root of the repo, it will first run the "prebuild" step of this package, which is defined in the `build` script of this package's package.json.

This step will:

1. Generate primitive tokens.
2. Build CSS and JavaScript token files.
3. Update the design tokens documentation.
4. Format all generated files.

The files generated in this step will all be committed to the repo.

After the prebuild step, the package will be built into its final form via the repo's standard package build script.

## Contributing to this package

This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to [npm](https://www.npmjs.com/) and used by [WordPress](https://make.wordpress.org/core/) as well as other software projects.
Expand Down