-
Notifications
You must be signed in to change notification settings - Fork 117
Columns Block: Try adding a "negative margins" block style #337
Conversation
Looks cool, fun to play around with 👍 I wonder if this should also be a style on the Media & Text block? |
It definitely could be. I'll give it a try tomorrow. |
@melchoyce I tried a quick version of this, but I think it's a little less suited for that block for a couple reasons:
|
I like these column effects, can you share some screenshots of the responsive view? |
By default, the columns block stacks its columns below ~600px wide, and this PR doesn't change that. So these new styles only apply on screens larger than that.
(at 760px wide, you'll notice there's no vertical margin between the two images. That's default columns block behavior and is not modified by this PR) I had a good chat with @jasmussen earlier about this PR and #277. He had some great input and helped me solidify my thoughts about these two PRs:
So in general, my recommendation is:
How do folks feel about that? |
A short addendum to the comment above:
I added this in 9850f6f, and it works pretty well to ensure that text in the second column is readable by default. Users are still able to modify colors using the standard Gutenberg color controls. And it's only for direct children. |
I think this will be great and that it can be merged. |
Thanks, all! I'll open some followup PRs for block patterns that use this. |
This was an idea I had to achieve a couple of the block styles in #50.
The PR adds a "Overlap" block style to the columns block that applies a negative margin to each second column. It looks really weird in the preview:
But you can do some interesting things with it:
It also lets you achieve something similar to #277, but by using single image blocks and spacers:
In general, it seems a little hacky to me, but I like the effect, so I'm curious what others think.