Skip to content

Commit

Permalink
WIP/Try: Make pullquote a variation
Browse files Browse the repository at this point in the history
This PR takes a meager stab at #5947 by copying the pullquote styles to the basic quote block and making it a variation, now titled "Elaborate". Name aside, which is up for discussion, this PR is mostly intended to get the ball rolling on eventually doing this, vs. keeping the status quo.

If we mean to move forward, aside from feedback, the actual pullquote needs to be deprecated and removed, and I'd need help doing that as I assume it's not enough to just delete the pullquote folder.

One issue already surfaced from this: the pullquote block features block level alignments, whereas the quote block features only inline level alignments (text align). That means you can float the pullquote, but not the quote. At least not yet, though presumably with a container block you'd be able to do that in the future.

What are your thoughts on how to move forward with this?
  • Loading branch information
Joen Asmussen committed Aug 10, 2018
1 parent dd78fd2 commit a720802
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions core-blocks/quote/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export const settings = {
styles: [
{ name: 'default', label: __( 'Regular' ), isDefault: true },
{ name: 'large', label: __( 'Large' ) },
{ name: 'elaborate', label: __( 'Elaborate' ) },
],

transforms: {
Expand Down
21 changes: 21 additions & 0 deletions core-blocks/quote/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,25 @@
text-align: right;
}
}

&.is-style-elaborate {
padding: 3em 0;
text-align: center;
border-top: 4px solid $dark-gray-500;
border-bottom: 4px solid $dark-gray-500;
color: $dark-gray-600;

p {
font-size: 24px;
line-height: 1.6;
}

cite,
footer {
position: relative;
color: $dark-gray-600;
text-transform: uppercase;
font-size: $default-font-size;
}
}
}
2 changes: 1 addition & 1 deletion core-blocks/quote/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
}

.wp-block-quote:not(.is-large):not(.is-style-large) {
.wp-block-quote:not(.is-large):not(.is-style-large):not(.is-style-elaborate) {
border-left: 4px solid $black;
padding-left: 1em;
}

0 comments on commit a720802

Please sign in to comment.