-
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
Styles for blocks with a wide design surface area #33255
Labels
Needs Design Feedback
Needs general design feedback.
[Type] Discussion
For issues that are high-level and not yet ready to implement.
Comments
oandregal
changed the title
Styles for blocks with a wide design surface
Styles for blocks with a wide design surface area
Jul 7, 2021
skorasaurus
added
[Type] Discussion
For issues that are high-level and not yet ready to implement.
Needs Design
Needs design efforts.
Needs Design Feedback
Needs general design feedback.
and removed
Needs Design
Needs design efforts.
labels
Jul 8, 2021
This was referenced Jul 9, 2021
This was referenced Jul 13, 2021
7 tasks
2 tasks
This was referenced Oct 21, 2021
7 tasks
This was referenced Jan 13, 2022
25 tasks
Closing this as it no longer reflects the reality of the styles sub-system. |
github-project-automation
bot
moved this from ⏱ Not Started
to ✅ Done
in Design Tools Project
Apr 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Needs Design Feedback
Needs general design feedback.
[Type] Discussion
For issues that are high-level and not yet ready to implement.
This is for gathering thoughts, so we can support well blocks with a wide design surface.
People working on blocks such as the table, navigation, search, quote, and others have reported that the number of design tokens available to them is not enough for the things we want those blocks to do.
I'll illustrate this with colors, but the same can be argued for any other style property (see #33232 for a related example). We allow 4 types of colors via
block.json
supports andtheme.json
styles: text, background (gradient as a variation of background), link, and border. Some blocks need a few more, as these images illustrate:Table #33157
Navigation #29963
What approaches do we have available?
So far, approaches used to account for this include:
This is the way that is most natural to the blocks model and works well with
block.json
andtheme.json
. Cons include that it doesn't cover all the cases and that results in a bad user experience in other cases: to change the color of all children users need to select one by one instead of being able to change them all in the parent. It could be minimized by allowing the parent block to absorb the children's design tools.This addresses the issue for the block styles sidebar (user-facing). It doesn't for
theme.json
(theme-facing) and the global styles sidebar (user-facing) because there's no way to register custom styles and controls, respectively. There's some progress for the new UI for global styles at #32923 so work on allowing custom styles and controls may need to wait a bit.This has been talked about in a few places. Some ideas to do this include:
Introducing the concept of "color sets" as in #33157 A way for blocks to register their own colors via
block.json
and target them viatheme.json
. The same could be expanded for any other style property.Expanding the concept of "elements" introduced at #29891 Elements already exist in the
theme.json
styles and the plan is to make them visible to users in the global styles sidebar. Presumably, also in the block sidebar. While the engine can provide "default" elements (at the moment, only link and h1-h6) we'll likely need to allow custom elements per block as well (e.g. the header and footer for the table block). This has been touched upon at #33157 (comment)The text was updated successfully, but these errors were encountered: