-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 gradients support to Group, columns and media & text blocks #21375
Add gradients support to Group, columns and media & text blocks #21375
Conversation
Size Change: +18 B (0%) Total Size: 889 kB
ℹ️ View Unchanged
|
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.
With regard to Paragraph and Heading blocks, I think the most common use-case for a background on a Paragraph is to highlight that Paragraph as important/special, and I can see someone wanting to use a gradient background for that. I also think consistency would be a good thing in this case.
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.
Hi @youknowriad The PR itself looks good, but as in #21266 we will need to think about how things cascade.
Cascading for gradients may make sense e.g: as the theme, I may want to make buttons by default have a specific gradient, but it does not make much sense to have the gradient cascade from a group to the buttons inside. The solution is complex maybe that's where more specific variables enter? E.g: button may have a more specific variable, specifying the "background" the variable can be gradient or color than fallback to some kind of primary color.
Cascading the gradients in a container like a group to the descendants is probably never expected and maybe an inline style makes sense. But when we set a gradient in a container all the background related variables should be unset so the descents become transparent.
@jorgefilipecosta I agree about the cascading issue, I'll try to come up with a solution on a separate PR. |
5c7f989
to
cb39108
Compare
988ad5e
to
daae30a
Compare
Do please update the PR to include Paragraph and Heading blocks! |
Based on #21266
closes #21055
The paragraph and heading blocks also use the same hook so it's just as easy to add the gradients support there but I left them out cause gradient might not be that useful on textual blocks. That said, if you think we should just do it and be consistent, I'm happy to update the PR.
Everything is in the title.