From a932bb3851801526e318fafd509549bce641e6b8 Mon Sep 17 00:00:00 2001 From: Jake Spurlock Date: Mon, 13 Jul 2020 17:06:57 +0000 Subject: [PATCH] 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 --- .../themes/twentyeleven/editor-blocks.css | 53 +++++++++ .../twentyfifteen/css/editor-blocks.css | 101 ++++++++++++++++++ .../twentyfourteen/css/editor-blocks.css | 53 +++++++++ .../twentysixteen/css/editor-blocks.css | 101 ++++++++++++++++++ .../themes/twentyten/editor-blocks.css | 55 ++++++++++ .../twentythirteen/css/editor-blocks.css | 93 ++++++++++++++++ .../themes/twentytwelve/css/editor-blocks.css | 55 ++++++++++ 7 files changed, 511 insertions(+) diff --git a/src/wp-content/themes/twentyeleven/editor-blocks.css b/src/wp-content/themes/twentyeleven/editor-blocks.css index 75263b176e..98ec8ab00d 100644 --- a/src/wp-content/themes/twentyeleven/editor-blocks.css +++ b/src/wp-content/themes/twentyeleven/editor-blocks.css @@ -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; +} diff --git a/src/wp-content/themes/twentyfifteen/css/editor-blocks.css b/src/wp-content/themes/twentyfifteen/css/editor-blocks.css index 56c02cba4f..4827409cd4 100644 --- a/src/wp-content/themes/twentyfifteen/css/editor-blocks.css +++ b/src/wp-content/themes/twentyfifteen/css/editor-blocks.css @@ -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; +} diff --git a/src/wp-content/themes/twentyfourteen/css/editor-blocks.css b/src/wp-content/themes/twentyfourteen/css/editor-blocks.css index 079896cbfc..830ac15722 100644 --- a/src/wp-content/themes/twentyfourteen/css/editor-blocks.css +++ b/src/wp-content/themes/twentyfourteen/css/editor-blocks.css @@ -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; +} diff --git a/src/wp-content/themes/twentysixteen/css/editor-blocks.css b/src/wp-content/themes/twentysixteen/css/editor-blocks.css index 9376a45872..defb899ced 100644 --- a/src/wp-content/themes/twentysixteen/css/editor-blocks.css +++ b/src/wp-content/themes/twentysixteen/css/editor-blocks.css @@ -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; +} diff --git a/src/wp-content/themes/twentyten/editor-blocks.css b/src/wp-content/themes/twentyten/editor-blocks.css index f4d8e328e7..c0710a8476 100644 --- a/src/wp-content/themes/twentyten/editor-blocks.css +++ b/src/wp-content/themes/twentyten/editor-blocks.css @@ -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; +} diff --git a/src/wp-content/themes/twentythirteen/css/editor-blocks.css b/src/wp-content/themes/twentythirteen/css/editor-blocks.css index 3515fadf99..4b79fa8a00 100644 --- a/src/wp-content/themes/twentythirteen/css/editor-blocks.css +++ b/src/wp-content/themes/twentythirteen/css/editor-blocks.css @@ -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; +} diff --git a/src/wp-content/themes/twentytwelve/css/editor-blocks.css b/src/wp-content/themes/twentytwelve/css/editor-blocks.css index 8c3d66cdb4..d9efec32d5 100644 --- a/src/wp-content/themes/twentytwelve/css/editor-blocks.css +++ b/src/wp-content/themes/twentytwelve/css/editor-blocks.css @@ -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; +}