Skip to content

Commit 47cd11f

Browse files
Nahid F. Mohitaduth
authored andcommitted
Update RichText usage in Quote and Pullquote blocks to use div instead of inline cite elements (#8785)
1 parent 2fa3d3d commit 47cd11f

6 files changed

Lines changed: 8 additions & 10 deletions

File tree

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
}
1010

1111
.wp-block-pullquote {
12-
cite {
13-
display: block;
14-
}
15-
1612
cite .editor-rich-text__tinymce[data-is-empty="true"]::before {
1713
font-size: 14px;
1814
font-family: $default-font;

packages/block-library/src/pullquote/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ export const settings = {
7070
/>
7171
{ ( ! RichText.isEmpty( citation ) || isSelected ) && (
7272
<RichText
73-
tagName="cite"
7473
value={ citation }
7574
/* translators: the individual or entity quoted */
7675
placeholder={ __( 'Write citation…' ) }
@@ -79,6 +78,7 @@ export const settings = {
7978
citation: nextCitation,
8079
} )
8180
}
81+
className="wp-block-pullquote__citation"
8282
/>
8383
) }
8484
</blockquote>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
color: $dark-gray-600;
55

66
cite,
7-
footer {
7+
footer,
8+
&__citation {
89
color: $dark-gray-600;
910
text-transform: uppercase;
1011
font-size: $default-font-size;
12+
font-style: italic;
1113
}
1214
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
.wp-block-quote {
22
margin: 0;
33

4-
cite {
5-
display: block;
4+
&__citation {
65
font-size: $default-font-size;
76
}
87
}

packages/block-library/src/quote/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ export const settings = {
205205
/>
206206
{ ( ! RichText.isEmpty( citation ) || isSelected ) && (
207207
<RichText
208-
tagName="cite"
209208
value={ citation }
210209
onChange={
211210
( nextCitation ) => setAttributes( {
@@ -214,6 +213,7 @@ export const settings = {
214213
}
215214
/* translators: the individual or entity quoted */
216215
placeholder={ __( 'Write citation…' ) }
216+
className="wp-block-quote__citation"
217217
/>
218218
) }
219219
</blockquote>

packages/block-library/src/quote/theme.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
margin: 20px 0;
33

44
cite,
5-
footer {
5+
footer,
6+
&__citation {
67
color: $dark-gray-300;
78
font-size: $default-font-size;
89
margin-top: 1em;

0 commit comments

Comments
 (0)