Skip to content

Commit

Permalink
Merge pull request #617 from Automattic/fixes/594-quote-block-border
Browse files Browse the repository at this point in the history
Dara: Align quote icon to right when text is right aligned
  • Loading branch information
laurelfulford authored Feb 15, 2019
2 parents 0f0b78b + 1220d42 commit 23d59e8
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 7 deletions.
20 changes: 20 additions & 0 deletions dara/blocks.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,26 @@ blockquote cite {
font-style: normal;
}

.wp-block-quote[style*="text-align:right"] {
padding-left: 0;
padding-right: 2.4em;
}

.wp-block-quote[style*="text-align:right"]::before {
left: auto;
right: -10px;
}

.rtl .wp-block-quote[style*="text-align:left"] {
padding-left: 2.4em;
padding-right: 0;
}

.rtl .wp-block-quote[style*="text-align:left"]::before {
left: -10px;
right: auto;
}

.wp-block-quote cite {
display: block;
font-family: "Source Sans Pro", Helvetica, sans-serif;
Expand Down
37 changes: 30 additions & 7 deletions dara/editor-blocks.css
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,19 @@

/* Quote */

.editor-block-list__block .wp-block-quote:not(.is-large):not(.is-style-large) {
.wp-block-quote:not(.is-large):not(.is-style-large),
.rtl .wp-block-quote:not(.is-large):not(.is-style-large)[style*="text-align:left"],
.rtl .wp-block-quote:not(.is-large):not(.is-style-large)[style*="text-align: left"] {
border: 0;
padding-left: 2.4em;
padding-right: 0;
}

.editor-block-list__block .wp-block-quote {
.wp-block-quote,
.rtl .wp-block-quote[style*="text-align:left"],
.rtl .wp-block-quote[style*="text-align: left"],
.rtl .wp-block-quote:not(.is-large):not(.is-style-large)[style*="text-align:left"],
.rtl .wp-block-quote:not(.is-large):not(.is-style-large)[style*="text-align: left"] {
border: none;
margin-left: 0;
margin-bottom: 1.6em;
Expand All @@ -295,7 +301,9 @@
font-style: normal;
}

.editor-block-list__block .wp-block-quote:before {
.wp-block-quote::before,
.rtl .wp-block-quote[style*="text-align:left"]::before,
.rtl .wp-block-quote[style*="text-align: left"]::before {
color: #ccc;
content: "\201C";
font-family: "Yrsa", Georgia, serif;
Expand All @@ -305,6 +313,21 @@
position: absolute;
top: -5px;
left: -10px;
right: auto;
}

.wp-block-quote:not(.is-large):not(.is-style-large)[style*="text-align:right"],
.wp-block-quote:not(.is-large):not(.is-style-large)[style*="text-align: right"],
.wp-block-quote[style*="text-align:right"],
.wp-block-quote[style*="text-align: right"] {
padding-left: 0;
padding-right: 2.4em;
}

.wp-block-quote[style*="text-align:right"]::before,
.wp-block-quote[style*="text-align: right"]::before {
left: auto;
right: -10px;
}

.editor-block-list__block .wp-block-quote__citation {
Expand All @@ -317,18 +340,18 @@
text-transform: uppercase;
}

.rtl .editor-block-list__block .wp-block-quote:not(.is-large):not(.is-style-large) {
.rtl .wp-block-quote:not(.is-large):not(.is-style-large) {
padding-left: 0;
padding-right: 2.4em;
}

.rtl .editor-block-list__block .wp-block-quote.is-large,
.rtl .editor-block-list__block .wp-block-quote.is-style-large {
.rtl .wp-block-quote.is-large,
.rtl .wp-block-quote.is-style-large {
padding-left: 0;
padding-right: 1.6em;
}

.rtl .editor-block-list__block .wp-block-quote:before {
.rtl .wp-block-quote:before {
position: absolute;
left: auto;
right: -10px;
Expand Down

0 comments on commit 23d59e8

Please sign in to comment.