-
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
Column Block: Add color and padding support to individual column block #31778
Column Block: Add color and padding support to individual column block #31778
Conversation
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.
Thanks for adding the color support @andrewserong 👍
Tests well for me.
I'm not certain regarding the new CSS style though. It would conflict with theme set values once padding support is added. I'd be inclined to omit it from this PR as it would only have to be removed later.
Thanks for testing! It looks a little weird without padding altogether, so I'll group this change with adding in padding support, too. |
Updated to remove the CSS rule, and add in padding support to the individual column block. |
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.
LGTM ✨
One minor question. Is the intention to add padding support to the columns block separately? That will just be a simple opt-in to the padding support as well.
Thanks @aaronrobertshaw!
Yes, I ran into a bit of odd behaviour with the interactions between setting padding at the Columns block level and figuring out the inner spacing (or margins) between the individual column blocks, so thought I'd try splitting these out for the time being. Also the parent Columns block currently has the following CSS rule which could cause us issues, so I thought that might be better to figure out on another PR in case it takes a little longer to fix up:
|
Sounds like a plan. Once the tests pass we should be right to merge this. |
All tests are now passing. I've manually re-tested this as well and it's still working nicely 👌 I'll merge this and we can iterate on the parent columns block as discussed. |
Description
Note: I've left padding / margin support out of the Columns block for the moment.
Related to #30753
How has this been tested?
Manually — add a columns block to a post, and test setting colours at the individual column block level. Blocks within the column block should override colors set at the column block level. Also, test the Padding settings under Spacing on the individual Column block.
Screenshots
Setting padding to
1em
we can get the headings to line up between the column with a background color, and the column without a background color:Types of changes
New feature (non-breaking change which adds functionality)
Checklist:
*.native.js
files for terms that need renaming or removal).