-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add elevation tokens to storybook #66122
Conversation
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 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. |
Visually showing the different elevation options would be a great addition to this page, similarly to how we show the colors tokens — we should be able to do so by either creating an ad-hoc example for this page, or by using an existing component (ie.
Do you mean adding a code snippet? For now, I guess a consumer would only be able to consume the token as Sass variables, right? This should then change one the Theme engine will be implemented and will provide tokens as CSS variables (cc @mirka) |
Yes
I don't know :D I kind of assumed the properties in config-values.js were accessible too, but perhaps not?
Agreed. It would be nice to do it in an abstract way, but the |
That would be ideal. It's not something that can't be done in a separate PR, though. I'm fine with approaching these documentation pages in an incremental way. |
I'll push an update later today with code snippets and a visual examples for each elevation |
Flaky tests detected in 2db5ee2. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11386852895
|
Pushed a couple of tiny adjustments, I reckon this is in a decent spot for an initial iteration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge and iterate 🚀
Co-authored-by: jameskoster <[email protected]> Co-authored-by: ciampo <[email protected]> Co-authored-by: tyxla <[email protected]>
Follow up to #65993.
What?
Adds elevation tokens section to storybook.
Why?
This makes them more discoverable and usable.
Testing Instructions
npm run storybook
The usage section definitely needs some input from an engineer. It would be good to include a section describing how to use the tokens in a third party app.