Skip to content
This repository has been archived by the owner on Dec 1, 2019. It is now read-only.

Fix block button text color setting not taking effect #895

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
bf13b7e
Block editor font sizes: Updated ”Regular” to match the front-end, an…
andersnoren Oct 5, 2019
546c180
Block Editor Styles: Update Block: Columns with heading margins to ma…
andersnoren Oct 5, 2019
78850b0
Merge branch 'master' of https://github.com/WordPress/twentytwenty in…
andersnoren Oct 5, 2019
2935923
Merge branch 'master' of https://github.com/WordPress/twentytwenty in…
andersnoren Oct 6, 2019
28591d3
Merge branch 'master' of https://github.com/WordPress/twentytwenty in…
andersnoren Oct 7, 2019
daaa707
Merge branch 'master' of https://github.com/WordPress/twentytwenty in…
andersnoren Oct 10, 2019
195ce35
Merge branch 'master' of https://github.com/WordPress/twentytwenty in…
andersnoren Oct 12, 2019
bedc0fa
Merge branch 'master' of https://github.com/WordPress/twentytwenty in…
andersnoren Oct 13, 2019
f1e4738
Merge branch 'master' of https://github.com/WordPress/twentytwenty in…
andersnoren Oct 13, 2019
e08c7b1
Merge branch 'master' of https://github.com/WordPress/twentytwenty in…
andersnoren Oct 19, 2019
28b90be
Merge branch 'master' of https://github.com/WordPress/twentytwenty in…
andersnoren Oct 19, 2019
27d5985
Fix text color setting on buttons not having any effect
andersnoren Oct 19, 2019
e0f8acc
Build CSS
andersnoren Oct 19, 2019
d78902c
Increase base specificity of color classes, removed .wp-block-button_…
andersnoren Oct 20, 2019
afbdea6
Updated is-style-outline button size to match filled style
andersnoren Oct 20, 2019
2c1cbb3
Travis CSS
andersnoren Oct 20, 2019
df4e651
Merge branch 'master' of https://github.com/WordPress/twentytwenty in…
andersnoren Oct 20, 2019
e69114e
Build CSS
andersnoren Oct 20, 2019
b5b07aa
Merge branch 'master' into fix/block-button-text-color
ianbelanger79 Oct 21, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion assets/css/editor-style-block-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
}

.editor-styles-wrapper > * {
color: #000;
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
font-size: 18px;
}
Expand Down
20 changes: 10 additions & 10 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -602,29 +602,29 @@ function twentytwenty_get_elements_array() {
$elements = array(
'content' => array(
'accent' => array(
'color' => array( '.color-accent', '.color-accent-hover:hover', '.color-accent-hover:focus', '.has-accent-color', '.has-drop-cap:not(:focus):first-letter', '.wp-block-button.is-style-outline', 'a' ),
'color' => array( '.color-accent', '.color-accent-hover:hover', '.color-accent-hover:focus', ':root .has-accent-color', '.has-drop-cap:not(:focus):first-letter', '.wp-block-button.is-style-outline', 'a' ),
'border-color' => array( 'blockquote', '.border-color-accent', '.border-color-accent-hover:hover', '.border-color-accent-hover:focus' ),
'background' => array( 'button:not(.toggle)', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-file .wp-block-file__button', 'input[type="button"]', 'input[type="reset"]', 'input[type="submit"]', '.bg-accent', '.bg-accent-hover:hover', '.bg-accent-hover:focus', '.has-accent-background-color', '.comment-reply-link' ),
'background' => array( 'button:not(.toggle)', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-file .wp-block-file__button', 'input[type="button"]', 'input[type="reset"]', 'input[type="submit"]', '.bg-accent', '.bg-accent-hover:hover', '.bg-accent-hover:focus', ':root .has-accent-background-color', '.comment-reply-link' ),
'fill' => array( '.fill-children-accent', '.fill-children-accent *' ),
),
'background' => array(
'color' => array( 'button', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-button__link:active', '.wp-block-button__link:focus', '.wp-block-button__link:visited', '.wp-block-button__link:hover', '.wp-block-file__button', 'input[type="button"]', 'input[type="reset"]', 'input[type="submit"]', '.comment-reply-link' ),
'background' => array( '.has-background-background-color' ),
'color' => array( ':root .has-background-color', 'button', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-file__button', 'input[type="button"]', 'input[type="reset"]', 'input[type="submit"]', '.wp-block-button', '.comment-reply-link' ),
'background' => array( ':root .has-background-background-color' ),
),
'text' => array(
'color' => array( 'body', '.entry-title a', '.has-primary-color' ),
'background' => array( '.has-primary-background-color' ),
'color' => array( 'body', '.entry-title a', ':root .has-primary-color' ),
'background' => array( ':root .has-primary-background-color' ),
),
'secondary' => array(
'color' => array( 'cite', 'figcaption', '.wp-caption-text', '.post-meta', '.entry-content .wp-block-archives li', '.entry-content .wp-block-categories li', '.entry-content .wp-block-latest-posts li', '.wp-block-latest-comments__comment-date', '.wp-block-latest-posts__post-date', '.wp-block-embed figcaption', '.wp-block-image figcaption', '.wp-block-pullquote cite', '.comment-metadata', '.comment-respond .comment-notes', '.comment-respond .logged-in-as', '.pagination .dots', '.entry-content hr:not(.has-background)', 'hr.styled-separator', '.has-secondary-color' ),
'background' => array( '.has-secondary-background-color' ),
'color' => array( 'cite', 'figcaption', '.wp-caption-text', '.post-meta', '.entry-content .wp-block-archives li', '.entry-content .wp-block-categories li', '.entry-content .wp-block-latest-posts li', '.wp-block-latest-comments__comment-date', '.wp-block-latest-posts__post-date', '.wp-block-embed figcaption', '.wp-block-image figcaption', '.wp-block-pullquote cite', '.comment-metadata', '.comment-respond .comment-notes', '.comment-respond .logged-in-as', '.pagination .dots', '.entry-content hr:not(.has-background)', 'hr.styled-separator', ':root .has-secondary-color' ),
'background' => array( ':root .has-secondary-background-color' ),
),
'borders' => array(
'border-color' => array( 'pre', 'fieldset', 'input', 'textarea', 'table', 'table *', 'hr' ),
'background' => array( 'caption', 'code', 'code', 'kbd', 'samp', '.wp-block-table.is-style-stripes tbody tr:nth-child(odd)', '.has-subtle-background-background-color' ),
'background' => array( 'caption', 'code', 'code', 'kbd', 'samp', '.wp-block-table.is-style-stripes tbody tr:nth-child(odd)', ':root .has-subtle-background-background-color' ),
'border-bottom-color' => array( '.wp-block-table.is-style-stripes' ),
'border-top-color' => array( '.wp-block-latest-posts.is-grid li' ),
'color' => array( '.has-subtle-background-color' ),
'color' => array( ':root .has-subtle-background-color' ),
),
),
'header-footer' => array(
Expand Down
26 changes: 15 additions & 11 deletions style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -2563,43 +2563,43 @@ h2.entry-title {

/* CUSTOM COLORS */

.has-accent-color {
:root .has-accent-color {
color: #cd2653;
}

.has-accent-background-color {
:root .has-accent-background-color {
background-color: #cd2653;
}

.has-primary-color {
:root .has-primary-color {
color: #000;
}

.has-primary-background-color {
:root .has-primary-background-color {
background-color: #000;
}

.has-secondary-color {
:root .has-secondary-color {
color: #6d6d6d;
}

.has-secondary-background-color {
:root .has-secondary-background-color {
background-color: #6d6d6d;
}

.has-subtle-background-color {
:root .has-subtle-background-color {
color: #dcd7ca;
}

.has-subtle-background-background-color {
:root .has-subtle-background-background-color {
background-color: #dcd7ca;
}

.has-background-color {
:root .has-background-color {
color: #f5efe0;
}

.has-background-background-color {
:root .has-background-background-color {
background-color: #f5efe0;
}

Expand Down Expand Up @@ -2835,10 +2835,14 @@ h2.entry-title {
color: #cd2653;
}

.wp-block-button.is-style-outline .wp-block-button__link {
.is-style-outline .wp-block-button__link:not(.has-text-color) {
color: inherit;
}

.is-style-outline .wp-block-button__link {
padding: calc(1.1em - 0.2rem) calc(1.44em - 0.2rem);
}

/* Block: Columns ---------------------------- */

.wp-block-column {
Expand Down
26 changes: 15 additions & 11 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2571,43 +2571,43 @@ h2.entry-title {

/* CUSTOM COLORS */

.has-accent-color {
:root .has-accent-color {
color: #cd2653;
}

.has-accent-background-color {
:root .has-accent-background-color {
background-color: #cd2653;
}

.has-primary-color {
:root .has-primary-color {
color: #000;
}

.has-primary-background-color {
:root .has-primary-background-color {
background-color: #000;
}

.has-secondary-color {
:root .has-secondary-color {
color: #6d6d6d;
}

.has-secondary-background-color {
:root .has-secondary-background-color {
background-color: #6d6d6d;
}

.has-subtle-background-color {
:root .has-subtle-background-color {
color: #dcd7ca;
}

.has-subtle-background-background-color {
:root .has-subtle-background-background-color {
background-color: #dcd7ca;
}

.has-background-color {
:root .has-background-color {
color: #f5efe0;
}

.has-background-background-color {
:root .has-background-background-color {
background-color: #f5efe0;
}

Expand Down Expand Up @@ -2845,10 +2845,14 @@ h2.entry-title {
color: #cd2653;
}

.wp-block-button.is-style-outline .wp-block-button__link {
.is-style-outline .wp-block-button__link:not(.has-text-color) {
color: inherit;
}

.is-style-outline .wp-block-button__link {
padding: calc(1.1em - 0.2rem) calc(1.44em - 0.2rem);
}

/* Block: Columns ---------------------------- */

.wp-block-column {
Expand Down