Skip to content

Commit d452cb4

Browse files
authored
Pullquote Block: Add padding and margin support (#45731)
* Pullquote Block: Add padding and margin support * Update padding styles * Don't use __experimentalStyle
1 parent 33b6e64 commit d452cb4

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

docs/reference-guides/core-blocks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ Give special visual emphasis to a quote from your text. ([Source](https://github
694694

695695
- **Name:** core/pullquote
696696
- **Category:** text
697-
- **Supports:** align (full, left, right, wide), anchor, color (background, gradients, link, text), typography (fontSize, lineHeight)
697+
- **Supports:** align (full, left, right, wide), anchor, color (background, gradients, link, text), spacing (margin, padding), typography (fontSize, lineHeight)
698698
- **Attributes:** citation, textAlign, value
699699

700700
## Query Loop

packages/block-library/src/pullquote/block.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
"text": true
3636
}
3737
},
38+
"spacing": {
39+
"margin": true,
40+
"padding": true
41+
},
3842
"typography": {
3943
"fontSize": true,
4044
"lineHeight": true,

packages/block-library/src/pullquote/style.scss

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.wp-block-pullquote {
2-
padding: 3em 0;
2+
padding: 4em 0;
33
text-align: center; // Default text-alignment where the `textAlign` attribute value isn't specified.
44
overflow-wrap: break-word; // Break long strings of text without spaces so they don't overflow the block.
55
box-sizing: border-box;
@@ -10,6 +10,18 @@
1010
color: inherit;
1111
}
1212

13+
blockquote {
14+
margin: 0;
15+
}
16+
17+
p {
18+
margin-top: 0;
19+
20+
&:last-child {
21+
margin-bottom: 0;
22+
}
23+
}
24+
1325
&.alignleft,
1426
&.alignright {
1527
max-width: $content-width * 0.5;

0 commit comments

Comments
 (0)