- This topic has 9 replies, 2 voices, and was last updated 3 years, 2 months ago by Leo.
-
AuthorPosts
-
February 3, 2021 at 10:21 am #1644534Michal Janata
Hi,
I would like to report 2 issues with the new “Text & Media” block, which is included as part of WordPress.
1) The block does not respect the padding around page content
When the block is inserted into the page, it goes right to the edge of the the content box, not respecting the padding which is normally present for content. I was able to fix this with the following Additional CSS:@media (min-width: 769px) { .entry-content .alignwide, body:not(.no-sidebar) .entry-content .alignfull { margin-left: 0; width: inherit; } .wp-block-media-text.has-media-on-the-left .wp-block-media-text__content, .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content { padding-left: 0; } }
2) There is no space between the image and the text on mobile
On mobile, the text is pushed bellow the image. However, there is no spacing, so the text almost touches the image. I was able to fix this with the following Additional CSS:@media (max-width: 768px) { .is-stacked-on-mobile .wp-block-media-text__media { margin-bottom: 1.5em; } }
(however, I think the value maybe should come from the customizer, not be hard-coded)
Thanks 🙂
February 3, 2021 at 11:06 am #1644611LeoStaffCustomer SupportHi there,
Ideally, these things should be handled by WordPress itself and truthfully it’s kind of a pointless block – it’s nothing more than a columns block.
My honest recommendation would be to use the grid blocks from GenerateBlocks so you will have complete control over the paddings, margins, gaps, order etc:
https://docs.generateblocks.com/article/grid-overview/February 3, 2021 at 12:50 pm #1644750Michal JanataHi, there is a meaningful difference between the columns block and that is the behaviour on mobile – the image is always above the text. With columns, this is not the case.
I have seen GenerateBlocks and it seems really nice. However, GeneratePress and GenerateBlocks are two separate products and I would like to be able to use stock WordPress blocks with GP without being forced to use GB as well.February 3, 2021 at 4:53 pm #1644893LeoStaffCustomer SupportSounds good. Your CSS would be the best solution for now.
February 4, 2021 at 7:31 am #1645769Michal JanataSo will you fix it for yourself? To make it work properly.
February 4, 2021 at 11:15 am #1645997LeoStaffCustomer Support1) The block does not respect the padding around page content
When the block is inserted into the page, it goes right to the edge of the the content box, not respecting the padding which is normally present for content.Looks like the text and media block only has 2 alignment options – wide width and full width:
https://www.screencast.com/t/3JNP58wbThe Wide width option is supposed to overwrite the padding around the page content – you can see the indication in the Wide width icon as shown in the screenshot above.
2) There is no space between the image and the text on mobile.
I would say that this is a personal preference so CSS solution should be used when needed.
February 5, 2021 at 6:07 am #1646835Michal JanataHi,
thanks for the reply
1) I haven’t noticed that and will try to add the option for non-wide alignment with gutenberg.
2) Yes, this is a personal preference, however, I don’t think the current state is a good default.February 5, 2021 at 10:00 am #1647305LeoStaffCustomer Support2) Yes, this is a personal preference, however, I don’t think the current state is a good default.
We haven’t received other mentions of this. Let’s say if we add what you proposed, then other users that are using the text & media block who are happy with the current default/layout will have some to add the CSS to remove it. It’s essentially the same thing.
I’d say that this should be an option added by Gutenberg.
February 6, 2021 at 8:46 am #1648333Michal JanataWell, I’m trying to argue that putting some spacing in would be preferable by more users than not doing so.
February 6, 2021 at 11:10 am #1648444LeoStaffCustomer SupportI can’t recall other similar requests on this – most users who want control over the spacing would just go with GenerateBlocks as it allows you complete control and not just a set default padding.
GP doesn’t add or remove styles from the default Text & Media block so in this case, CSS should be added when needed.
-
AuthorPosts
- You must be logged in to reply to this topic.