Storybook: Change the default font.#76366
Conversation
|
For now, this is mostly a work in progress, stepping out for the day. If it inspires you, and you know exactly how to fix this right up so it doesn't add inline styles and !importants, feel free to push directly. |
|
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @jasmussen! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
|
Flaky tests detected in d2a5a89. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/22956806719
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @joen@git.wordpress.org. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Okay this is now ready. We already have a fine theme.js file that styles Storybook. But it was only loaded for the "manager", i.e. sidebar, not for the "preview", i.e. canvas. This should now be fixed. |
|
Size Change: 0 B Total Size: 6.89 MB ℹ️ View Unchanged
|
mirka
left a comment
There was a problem hiding this comment.
I moved your changes to the existing config file so it doesn't wipe out the rest of the settings (d2a5a89) 👍
There's actually some scaffolding of what's likely dead code that need to be dug up to address this, a file called global-basic.scss and global-wordpress.scss, that do not appear to be in use.
These are used in the global WP stylesheet switcher in the toolbar, so don't worry about these 😄
|
Thanks so much, I'll merge when the checks pass! |
What?
This changes the default font of Storybook to the same system fonts that are in use in other design system material:
This font is already in use in the sidebar, aka "manager", but for some reason it doesn't apply in the main canvas, aka "preview". There's actually some scaffolding of what's likely dead code that need to be dug up to address this, a file called global-basic.scss and global-wordpress.scss, that do not appear to be in use.Testing Instructions
npm run storybook:dev