Opened 4 years ago
Closed 4 years ago
#5469 closed enhancement (fixed)
Padding on group blocks
Reported by: | jdy68 | Owned by: | coffee2code |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Make (Get Involved) / P2 | Keywords: | has-patch has-screenshots |
Cc: |
Description
Hi,
I noticed a lack in the styles of the Group type blocks. Indeed, no padding is applied to the blocks of this type on frontend.
In the Editor a padding is applied, but not on frontend.
Can you add this css property to group blocks?
See attached screenshots, where the group consists of a head block and a paragraph block.
Attachments (5)
Change History (12)
#2
@
4 years ago
Hi @coffee2code,
you can see an example at this url:
https://fr.wordpress.org/support/article/overview-of-wordpress/
Thank you for your interest in this ticket.
#3
@
4 years ago
- Keywords has-patch has-screenshots added
@coffee2code 5469.diff
should improve the visual rendering of group block. I edited WP4 global styles because I think every instances on WordPress.org would benefit from this change :)
#5
@
4 years ago
@audrasjb: Any reason we shouldn't instead do something like:
.wp-block-group.has-background { padding: 1.25em 2.375em; }
Not having followed the matter closely, it appears as though this is an oversight in Gutenberg. The core CSS file that defines padding for blocks that have a background color (search for .has-background
) omits defining the padding for a block group with a background color.
The p
just before this block in the example URL provided in #comment:2 has padding applied in this way. The CSS file defines the above padding for h1
-h6
, ol
, li
, p
. and block columns.
Seems to look as desired on my end when I do it this way.
appearance in the editor