Bundled Themes: Add custom color pallettes for block editor.

Gutenberg 7.9 added support for themes to bundle their own custom styles in to the editor. These changes have been added to 2010 - 2016.

See #50120. 

Props kjellr, sabernhardt, ianbelanger. 



git-svn-id: https://develop.svn.wordpress.org/trunk@48459 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jake Spurlock 2020-07-13 17:06:57 +00:00
parent d8c91ce45f
commit a932bb3851
7 changed files with 511 additions and 0 deletions

View File

@ -12,6 +12,7 @@ Description: Used to style blocks in the editor.
4.0 Blocks - Formatting
5.0 Blocks - Layout Elements
6.0 Blocks - Widgets
7.0 Blocks - Colors
--------------------------------------------------------------*/
/*--------------------------------------------------------------
@ -471,3 +472,55 @@ p.has-drop-cap:not(:focus)::first-letter {
margin-left: 0;
margin-right: 0;
}
/*--------------------------------------------------------------
7.0 Blocks - Colors
--------------------------------------------------------------*/
:root .editor-styles-wrapper .has-blue-color {
color: #1982d1;
}
:root .editor-styles-wrapper .has-blue-background-color {
background-color: #1982d1;
}
:root .editor-styles-wrapper .has-black-color {
color: #000;
}
:root .editor-styles-wrapper .has-black-background-color {
background-color: #000;
}
:root .editor-styles-wrapper .has-dark-gray-color {
color: #373737;
}
:root .editor-styles-wrapper .has-dark-gray-background-color {
background-color: #373737;
}
:root .editor-styles-wrapper .has-medium-gray-color {
color: #666;
}
:root .editor-styles-wrapper .has-medium-gray-background-color {
background-color: #666;
}
:root .editor-styles-wrapper .has-light-gray-color {
color: #e2e2e2;
}
:root .editor-styles-wrapper .has-light-gray-background-color {
background-color: #e2e2e2;
}
:root .editor-styles-wrapper .has-white-color {
color: #fff;
}
:root .editor-styles-wrapper .has-white-background-color {
background-color: #fff;
}

View File

@ -12,6 +12,7 @@ Description: Used to style blocks in the editor.
4.0 Blocks - Formatting
5.0 Blocks - Layout Elements
6.0 Blocks - Widgets
7.0 Blocks - Colors
--------------------------------------------------------------*/
/*--------------------------------------------------------------
@ -868,3 +869,103 @@ p.has-drop-cap:not(:focus)::first-letter {
.edit-post-visual-editor .wp-block-latest-posts.is-grid li {
margin-bottom: 16px;
}
/*--------------------------------------------------------------
7.0 Blocks - Colors
--------------------------------------------------------------*/
:root .editor-styles-wrapper .has-dark-gray-color {
color: #111;
}
:root .editor-styles-wrapper .has-dark-gray-background-color {
background-color: #111;
}
:root .editor-styles-wrapper .has-light-gray-color {
color: #f1f1f1;
}
:root .editor-styles-wrapper .has-light-gray-background-color {
background-color: #f1f1f1;
}
:root .editor-styles-wrapper .has-white-color {
color: #fff;
}
:root .editor-styles-wrapper .has-white-background-color {
background-color: #fff;
}
:root .editor-styles-wrapper .has-yellow-color {
color: #f4ca16;
}
:root .editor-styles-wrapper .has-yellow-background-color {
background-color: #f4ca16;
}
:root .editor-styles-wrapper .has-dark-brown-color {
color: #352712;
}
:root .editor-styles-wrapper .has-dark-brown-background-color {
background-color: #352712;
}
:root .editor-styles-wrapper .has-medium-pink-color {
color: #e53b51;
}
:root .editor-styles-wrapper .has-medium-pink-background-color {
background-color: #e53b51;
}
:root .editor-styles-wrapper .has-light-pink-color {
color: #ffe5d1;
}
:root .editor-styles-wrapper .has-light-pink-background-color {
background-color: #ffe5d1;
}
:root .editor-styles-wrapper .has-dark-purple-color {
color: #2e2256;
}
:root .editor-styles-wrapper .has-dark-purple-background-color {
background-color: #2e2256;
}
:root .editor-styles-wrapper .has-purple-color {
color: #674970;
}
:root .editor-styles-wrapper .has-purple-background-color {
background-color: #674970;
}
:root .editor-styles-wrapper .has-blue-gray-color {
color: #22313f;
}
:root .editor-styles-wrapper .has-blue-gray-background-color {
background-color: #22313f;
}
:root .editor-styles-wrapper .has-bright-blue-color {
color: #55c3dc;
}
:root .editor-styles-wrapper .has-bright-blue-background-color {
background-color: #55c3dc;
}
:root .editor-styles-wrapper .has-light-blue-color {
color: #e9f2f9;
}
:root .editor-styles-wrapper .has-light-blue-background-color {
background-color: #e9f2f9;
}

View File

@ -12,6 +12,7 @@ Description: Used to style blocks in the editor.
4.0 Blocks - Formatting
5.0 Blocks - Layout Elements
6.0 Blocks - Widgets
7.0 Blocks - Colors
--------------------------------------------------------------*/
/*--------------------------------------------------------------
@ -482,3 +483,55 @@ p.has-drop-cap:not(:focus)::first-letter {
margin-left: 0;
margin-right: 0;
}
/*--------------------------------------------------------------
7.0 Blocks - Colors
--------------------------------------------------------------*/
:root .editor-styles-wrapper .has-green-color {
color: #24890d;
}
:root .editor-styles-wrapper .has-green-background-color {
background-color: #24890d;
}
:root .editor-styles-wrapper .has-black-color {
color: #000;
}
:root .editor-styles-wrapper .has-black-background-color {
background-color: #000;
}
:root .editor-styles-wrapper .has-dark-gray-color {
color: #2b2b2b;
}
:root .editor-styles-wrapper .has-dark-gray-background-color {
background-color: #2b2b2b;
}
:root .editor-styles-wrapper .has-medium-gray-color {
color: #767676;
}
:root .editor-styles-wrapper .has-medium-gray-background-color {
background-color: #767676;
}
:root .editor-styles-wrapper .has-light-gray-color {
color: #f5f5f5;
}
:root .editor-styles-wrapper .has-light-gray-background-color {
background-color: #f5f5f5;
}
:root .editor-styles-wrapper .has-white-color {
color: #fff;
}
:root .editor-styles-wrapper .has-white-background-color {
background-color: #fff;
}

View File

@ -12,6 +12,7 @@ Description: Used to style blocks in the editor.
4.0 Blocks - Formatting
5.0 Blocks - Layout Elements
6.0 Blocks - Widgets
7.0 Blocks - Colors
--------------------------------------------------------------*/
/*--------------------------------------------------------------
@ -614,3 +615,103 @@ Description: Used to style blocks in the editor.
.edit-post-visual-editor .wp-block-latest-posts.is-grid li {
margin-bottom: 16px;
}
/*--------------------------------------------------------------
7.0 Blocks - Colors
--------------------------------------------------------------*/
:root .editor-styles-wrapper .has-dark-gray-color {
color: #1a1a1a;
}
:root .editor-styles-wrapper .has-dark-gray-background-color {
background-color: #1a1a1a;
}
:root .editor-styles-wrapper .has-medium-gray-color {
color: #686868;
}
:root .editor-styles-wrapper .has-medium-gray-background-color {
background-color: #686868;
}
:root .editor-styles-wrapper .has-light-gray-color {
color: #e5e5e5;
}
:root .editor-styles-wrapper .has-light-gray-background-color {
background-color: #e5e5e5;
}
:root .editor-styles-wrapper .has-white-color {
color: #fff;
}
:root .editor-styles-wrapper .has-white-background-color {
background-color: #fff;
}
:root .editor-styles-wrapper .has-blue-gray-color {
color: #4d545c;
}
:root .editor-styles-wrapper .has-blue-gray-background-color {
background-color: #4d545c;
}
:root .editor-styles-wrapper .has-bright-blue-color {
color: #007acc;
}
:root .editor-styles-wrapper .has-bright-blue-background-color {
background-color: #007acc;
}
:root .editor-styles-wrapper .has-light-blue-color {
color: #9adffd;
}
:root .editor-styles-wrapper .has-light-blue-background-color {
background-color: #9adffd;
}
:root .editor-styles-wrapper .has-dark-brown-color {
color: #402b30;
}
:root .editor-styles-wrapper .has-dark-brown-background-color {
background-color: #402b30;
}
:root .editor-styles-wrapper .has-medium-brown-color {
color: #774e24;
}
:root .editor-styles-wrapper .has-medium-brown-background-color {
background-color: #774e24;
}
:root .editor-styles-wrapper .has-dark-red-color {
color: #640c1f;
}
:root .editor-styles-wrapper .has-dark-red-background-color {
background-color: #640c1f;
}
:root .editor-styles-wrapper .has-bright-red-color {
color: #ff675f;
}
:root .editor-styles-wrapper .has-bright-red-background-color {
background-color: #ff675f;
}
:root .editor-styles-wrapper .has-yellow-color {
color: #ffef8e;
}
:root .editor-styles-wrapper .has-yellow-background-color {
background-color: #ffef8e;
}

View File

@ -11,6 +11,7 @@ Description: Used to style blocks in the editor.
3.0 Blocks - Common Blocks
4.0 Blocks - Formatting
5.0 Blocks - Widgets
6.0 Blocks - Colors
--------------------------------------------------------------*/
/*--------------------------------------------------------------
@ -306,3 +307,57 @@ p.has-drop-cap:not(:focus)::first-letter {
.edit-post-visual-editor .wp-block-latest-posts.is-grid li {
margin-bottom: 1em;
}
/*--------------------------------------------------------------
6.0 Blocks - Colors
--------------------------------------------------------------*/
:root .editor-styles-wrapper .has-blue-color,
:root .editor-styles-wrapper .has-blue-color:visited {
color: #0066cc;
}
:root .editor-styles-wrapper .has-blue-background-color,
:root .editor-styles-wrapper .has-blue-background-color:visited {
background-color: #0066cc;
}
:root .editor-styles-wrapper .has-black-color,
:root .editor-styles-wrapper .has-black-color:visited {
color: #000;
}
:root .editor-styles-wrapper .has-black-background-color,
:root .editor-styles-wrapper .has-black-background-color:visited {
background-color: #000;
}
:root .editor-styles-wrapper .has-medium-gray-color,
:root .editor-styles-wrapper .has-medium-gray-color:visited {
color: #666;
}
:root .editor-styles-wrapper .has-medium-gray-background-color,
:root .editor-styles-wrapper .has-medium-gray-background-color:visited {
background-color: #666;
}
:root .editor-styles-wrapper .has-light-gray-color,
:root .editor-styles-wrapper .has-light-gray-color:visited {
color: #f1f1f1;
}
:root .editor-styles-wrapper .has-light-gray-background-color,
:root .editor-styles-wrapper .has-light-gray-background-color:visited {
background-color: #f1f1f1;
}
:root .editor-styles-wrapper .has-white-color,
:root .editor-styles-wrapper .has-white-color:visited {
color: #fff;
}
:root .editor-styles-wrapper .has-white-background-color,
:root .editor-styles-wrapper .has-white-background-color:visited {
background-color: #fff;
}

View File

@ -12,6 +12,7 @@ Description: Used to style blocks in the editor.
4.0 Blocks - Formatting
5.0 Blocks - Layout Elements
6.0 Blocks - Widgets
7.0 Blocks - Colors
--------------------------------------------------------------*/
/*--------------------------------------------------------------
@ -436,3 +437,95 @@ p.has-drop-cap:not(:focus)::first-letter {
.edit-post-visual-editor .wp-block-latest-posts.is-grid li {
margin-bottom: 1em;
}
/*--------------------------------------------------------------
7.0 Blocks - Colors
--------------------------------------------------------------*/
:root .editor-styles-wrapper .has-dark-gray-color {
color: #141412;
}
:root .editor-styles-wrapper .has-dark-gray-background-color {
background-color: #141412;
}
:root .editor-styles-wrapper .has-red-color {
color: #bc360a;
}
:root .editor-styles-wrapper .has-red-background-color {
background-color: #bc360a;
}
:root .editor-styles-wrapper .has-medium-orange-color {
color: #db572f;
}
:root .editor-styles-wrapper .has-medium-orange-background-color {
background-color: #db572f;
}
:root .editor-styles-wrapper .has-light-orange-color {
color: #ea9629;
}
:root .editor-styles-wrapper .has-light-orange-background-color {
background-color: #ea9629;
}
:root .editor-styles-wrapper .has-yellow-color {
color: #fbca3c;
}
:root .editor-styles-wrapper .has-yellow-background-color {
background-color: #fbca3c;
}
:root .editor-styles-wrapper .has-white-color {
color: #fff;
}
:root .editor-styles-wrapper .has-white-background-color {
background-color: #fff;
}
:root .editor-styles-wrapper .has-dark-brown-color {
color: #220e10;
}
:root .editor-styles-wrapper .has-dark-brown-background-color {
background-color: #220e10;
}
:root .editor-styles-wrapper .has-medium-brown-color {
color: #722d19;
}
:root .editor-styles-wrapper .has-medium-brown-background-color {
background-color: #722d19;
}
:root .editor-styles-wrapper .has-light-brown-color {
color: #eadaa6;
}
:root .editor-styles-wrapper .has-light-brown-background-color {
background-color: #eadaa6;
}
:root .editor-styles-wrapper .has-beige-color {
color: #e8e5ce;
}
:root .editor-styles-wrapper .has-beige-background-color {
background-color: #e8e5ce;
}
:root .editor-styles-wrapper .has-off-white-color {
color: #f7f5e7;
}
:root .editor-styles-wrapper .has-off-white-background-color {
background-color: #f7f5e7;
}

View File

@ -12,6 +12,7 @@ Description: Used to style blocks in the editor.
4.0 Blocks - Formatting
5.0 Blocks - Layout Elements
6.0 Blocks - Widgets
7.0 Blocks - Colors
--------------------------------------------------------------*/
/*--------------------------------------------------------------
@ -455,3 +456,57 @@ p.has-drop-cap:not(:focus)::first-letter {
padding-left: 0;
padding-right: 0;
}
/*--------------------------------------------------------------
7.0 Blocks - Colors
--------------------------------------------------------------*/
:root .editor-styles-wrapper .has-blue-color,
:root .editor-styles-wrapper .has-blue-color:visited {
color: #21759b;
}
:root .editor-styles-wrapper .has-blue-background-color,
:root .editor-styles-wrapper .has-blue-background-color:visited {
background-color: #21759b;
}
:root .editor-styles-wrapper .has-dark-gray-color,
:root .editor-styles-wrapper .has-dark-gray-color:visited {
color: #373737;
}
:root .editor-styles-wrapper .has-dark-gray-background-color,
:root .editor-styles-wrapper .has-dark-gray-background-color:visited {
background-color: #373737;
}
:root .editor-styles-wrapper .has-medium-gray-color,
:root .editor-styles-wrapper .has-medium-gray-color:visited {
color: #9f9f9f;
}
:root .editor-styles-wrapper .has-medium-gray-background-color,
:root .editor-styles-wrapper .has-medium-gray-background-color:visited {
background-color: #9f9f9f;
}
:root .editor-styles-wrapper .has-light-gray-color,
:root .editor-styles-wrapper .has-light-gray-color:visited {
color: #e6e6e6;
}
:root .editor-styles-wrapper .has-light-gray-background-color,
:root .editor-styles-wrapper .has-light-gray-background-color:visited {
background-color: #e6e6e6;
}
:root .editor-styles-wrapper .has-white-color,
:root .editor-styles-wrapper .has-white-color:visited {
color: #fff;
}
:root .editor-styles-wrapper .has-white-background-color,
:root .editor-styles-wrapper .has-white-background-color:visited {
background-color: #fff;
}