Skip to content

Commit

Permalink
Update RichText usage in Quote and Pullquote blocks to use div instea…
Browse files Browse the repository at this point in the history
…d of inline cite elements (#8785)
  • Loading branch information
Nahid F. Mohit authored and aduth committed Sep 10, 2018
1 parent 2fa3d3d commit 47cd11f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 10 deletions.
4 changes: 0 additions & 4 deletions packages/block-library/src/pullquote/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
}

.wp-block-pullquote {
cite {
display: block;
}

cite .editor-rich-text__tinymce[data-is-empty="true"]::before {
font-size: 14px;
font-family: $default-font;
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/pullquote/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export const settings = {
/>
{ ( ! RichText.isEmpty( citation ) || isSelected ) && (
<RichText
tagName="cite"
value={ citation }
/* translators: the individual or entity quoted */
placeholder={ __( 'Write citation…' ) }
Expand All @@ -79,6 +78,7 @@ export const settings = {
citation: nextCitation,
} )
}
className="wp-block-pullquote__citation"
/>
) }
</blockquote>
Expand Down
4 changes: 3 additions & 1 deletion packages/block-library/src/pullquote/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
color: $dark-gray-600;

cite,
footer {
footer,
&__citation {
color: $dark-gray-600;
text-transform: uppercase;
font-size: $default-font-size;
font-style: italic;
}
}
3 changes: 1 addition & 2 deletions packages/block-library/src/quote/editor.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
.wp-block-quote {
margin: 0;

cite {
display: block;
&__citation {
font-size: $default-font-size;
}
}
2 changes: 1 addition & 1 deletion packages/block-library/src/quote/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ export const settings = {
/>
{ ( ! RichText.isEmpty( citation ) || isSelected ) && (
<RichText
tagName="cite"
value={ citation }
onChange={
( nextCitation ) => setAttributes( {
Expand All @@ -214,6 +213,7 @@ export const settings = {
}
/* translators: the individual or entity quoted */
placeholder={ __( 'Write citation…' ) }
className="wp-block-quote__citation"
/>
) }
</blockquote>
Expand Down
3 changes: 2 additions & 1 deletion packages/block-library/src/quote/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
margin: 20px 0;

cite,
footer {
footer,
&__citation {
color: $dark-gray-300;
font-size: $default-font-size;
margin-top: 1em;
Expand Down

0 comments on commit 47cd11f

Please sign in to comment.