Skip to content

Commit

Permalink
Bug/#61 font colors backend (#62)
Browse files Browse the repository at this point in the history
* Updates the block title component to retain the set font color when editing the title

* Adds a has-custom-font-color class if a custom font color is set

* Overrides the p tag styles if a color is set

* Adds custom font color class to PHP-rendered blocks

* Adds font color class to search edit component

* Adds font color class to two-column block

* Adds font color class to recent posts

* Adds font color class to hero

* Adds font color class to default block

* Adds font color class to CTA

* Compiles
  • Loading branch information
coreymcollins authored and gregrickaby committed Oct 1, 2018
1 parent 68c0e0c commit 1401e0f
Show file tree
Hide file tree
Showing 14 changed files with 171 additions and 64 deletions.
34 changes: 23 additions & 11 deletions dist/blocks.build.js

Large diffs are not rendered by default.

91 changes: 65 additions & 26 deletions dist/blocks.editor.build.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.wp-admin [data-type^="wds"] {
.wp-admin [data-type^='wds'] {
margin-bottom: 30px;
margin-top: 30px;
max-width: none; }
Expand All @@ -16,10 +16,10 @@
-o-object-position: center center;
object-position: center center;
position: absolute;
top: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
top: 50%;
width: 100%;
z-index: -1; }

Expand All @@ -35,6 +35,9 @@
right: 50%;
width: 100vw; }

.has-custom-font-color p {
color: unset; }

.components-base-control {
width: 100%; }

Expand All @@ -43,7 +46,7 @@

.content-block-header h2 {
margin-bottom: 0; }
.wp-admin [data-type^="wds"] {
.wp-admin [data-type^='wds'] {
margin-bottom: 30px;
margin-top: 30px;
max-width: none; }
Expand All @@ -61,10 +64,10 @@
-o-object-position: center center;
object-position: center center;
position: absolute;
top: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
top: 50%;
width: 100%;
z-index: -1; }

Expand All @@ -80,6 +83,9 @@
right: 50%;
width: 100vw; }

.has-custom-font-color p {
color: unset; }

.components-base-control {
width: 100%; }

Expand All @@ -89,7 +95,7 @@
.wds-background-options .components-button svg {
position: relative;
top: 5px; }
.wp-admin [data-type^="wds"] {
.wp-admin [data-type^='wds'] {
margin-bottom: 30px;
margin-top: 30px;
max-width: none; }
Expand All @@ -107,10 +113,10 @@
-o-object-position: center center;
object-position: center center;
position: absolute;
top: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
top: 50%;
width: 100%;
z-index: -1; }

Expand All @@ -126,9 +132,12 @@
right: 50%;
width: 100vw; }

.has-custom-font-color p {
color: unset; }

.components-base-control {
width: 100%; }
.wp-admin [data-type^="wds"] {
.wp-admin [data-type^='wds'] {
margin-bottom: 30px;
margin-top: 30px;
max-width: none; }
Expand All @@ -146,10 +155,10 @@
-o-object-position: center center;
object-position: center center;
position: absolute;
top: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
top: 50%;
width: 100%;
z-index: -1; }

Expand All @@ -165,12 +174,15 @@
right: 50%;
width: 100vw; }

.has-custom-font-color p {
color: unset; }

.components-base-control {
width: 100%; }

.wds-other-options .blocks-base-control {
width: 100%; }
.wp-admin [data-type^="wds"] {
.wp-admin [data-type^='wds'] {
margin-bottom: 30px;
margin-top: 30px;
max-width: none; }
Expand All @@ -188,10 +200,10 @@
-o-object-position: center center;
object-position: center center;
position: absolute;
top: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
top: 50%;
width: 100%;
z-index: -1; }

Expand All @@ -207,6 +219,9 @@
right: 50%;
width: 100vw; }

.has-custom-font-color p {
color: unset; }

.components-base-control {
width: 100%; }

Expand All @@ -224,7 +239,7 @@
.editor-block-list__layout .button.wds-button-component form {
padding: 0 10px;
border-radius: 0; }
.wp-admin [data-type^="wds"] {
.wp-admin [data-type^='wds'] {
margin-bottom: 30px;
margin-top: 30px;
max-width: none; }
Expand All @@ -242,10 +257,10 @@
-o-object-position: center center;
object-position: center center;
position: absolute;
top: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
top: 50%;
width: 100%;
z-index: -1; }

Expand All @@ -261,6 +276,9 @@
right: 50%;
width: 100vw; }

.has-custom-font-color p {
color: unset; }

.components-base-control {
width: 100%; }

Expand All @@ -281,7 +299,7 @@
min-width: 450px; } }
.gist-block-controls .button {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; }
.wp-admin [data-type^="wds"] {
.wp-admin [data-type^='wds'] {
margin-bottom: 30px;
margin-top: 30px;
max-width: none; }
Expand All @@ -299,10 +317,10 @@
-o-object-position: center center;
object-position: center center;
position: absolute;
top: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
top: 50%;
width: 100%;
z-index: -1; }

Expand All @@ -318,12 +336,15 @@
right: 50%;
width: 100vw; }

.has-custom-font-color p {
color: unset; }

.components-base-control {
width: 100%; }

.edit-post-visual-editor .editor-block-list__block .wp-block-wds-hero {
min-height: 320px; }
.wp-admin [data-type^="wds"] {
.wp-admin [data-type^='wds'] {
margin-bottom: 30px;
margin-top: 30px;
max-width: none; }
Expand All @@ -341,10 +362,10 @@
-o-object-position: center center;
object-position: center center;
position: absolute;
top: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
top: 50%;
width: 100%;
z-index: -1; }

Expand All @@ -360,9 +381,12 @@
right: 50%;
width: 100vw; }

.has-custom-font-color p {
color: unset; }

.components-base-control {
width: 100%; }
.wp-admin [data-type^="wds"] {
.wp-admin [data-type^='wds'] {
margin-bottom: 30px;
margin-top: 30px;
max-width: none; }
Expand All @@ -380,10 +404,10 @@
-o-object-position: center center;
object-position: center center;
position: absolute;
top: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
top: 50%;
width: 100%;
z-index: -1; }

Expand All @@ -399,6 +423,9 @@
right: 50%;
width: 100vw; }

.has-custom-font-color p {
color: unset; }

.components-base-control {
width: 100%; }

Expand Down Expand Up @@ -482,7 +509,7 @@
position: relative;
width: 100%;
z-index: 100; }
.wp-admin [data-type^="wds"] {
.wp-admin [data-type^='wds'] {
margin-bottom: 30px;
margin-top: 30px;
max-width: none; }
Expand All @@ -500,10 +527,10 @@
-o-object-position: center center;
object-position: center center;
position: absolute;
top: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
top: 50%;
width: 100%;
z-index: -1; }

Expand All @@ -519,6 +546,9 @@
right: 50%;
width: 100vw; }

.has-custom-font-color p {
color: unset; }

.components-base-control {
width: 100%; }

Expand Down Expand Up @@ -553,7 +583,7 @@ div[data-type='wds/two-column'] .editor-block-toolbar {

.wds-two-column-options .blocks-base-control {
width: 100%; }
.wp-admin [data-type^="wds"] {
.wp-admin [data-type^='wds'] {
margin-bottom: 30px;
margin-top: 30px;
max-width: none; }
Expand All @@ -571,10 +601,10 @@ div[data-type='wds/two-column'] .editor-block-toolbar {
-o-object-position: center center;
object-position: center center;
position: absolute;
top: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
top: 50%;
width: 100%;
z-index: -1; }

Expand All @@ -590,6 +620,9 @@ div[data-type='wds/two-column'] .editor-block-toolbar {
right: 50%;
width: 100vw; }

.has-custom-font-color p {
color: unset; }

.components-base-control {
width: 100%; }

Expand All @@ -610,7 +643,7 @@ div[data-type='wds/two-column'] .editor-block-toolbar {

.wp-block-wds-recent-posts ul.columns-6 li {
width: calc( ( 100% / 6 ) - 16px); }
.wp-admin [data-type^="wds"] {
.wp-admin [data-type^='wds'] {
margin-bottom: 30px;
margin-top: 30px;
max-width: none; }
Expand All @@ -628,10 +661,10 @@ div[data-type='wds/two-column'] .editor-block-toolbar {
-o-object-position: center center;
object-position: center center;
position: absolute;
top: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
top: 50%;
width: 100%;
z-index: -1; }

Expand All @@ -647,6 +680,9 @@ div[data-type='wds/two-column'] .editor-block-toolbar {
right: 50%;
width: 100vw; }

.has-custom-font-color p {
color: unset; }

.components-base-control {
width: 100%; }

Expand Down Expand Up @@ -702,7 +738,7 @@ div[data-type='wds/two-column'] .editor-block-toolbar {
color: #dedede;
content: '\00d7';
margin-left: 5px; }
.wp-admin [data-type^="wds"] {
.wp-admin [data-type^='wds'] {
margin-bottom: 30px;
margin-top: 30px;
max-width: none; }
Expand All @@ -720,10 +756,10 @@ div[data-type='wds/two-column'] .editor-block-toolbar {
-o-object-position: center center;
object-position: center center;
position: absolute;
top: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
top: 50%;
width: 100%;
z-index: -1; }

Expand All @@ -739,5 +775,8 @@ div[data-type='wds/two-column'] .editor-block-toolbar {
right: 50%;
width: 100vw; }

.has-custom-font-color p {
color: unset; }

.components-base-control {
width: 100%; }
Loading

0 comments on commit 1401e0f

Please sign in to comment.