Administration: Adapts the secondary buttons colors to the admin schemes.

The admin schemes that don't meet the contrast guidelines are excluded from this change.

Props mapk, michaelarestad, mcsf, ocean90.
Closes #50537.


git-svn-id: https://develop.svn.wordpress.org/trunk@48342 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Riad Benguella 2020-07-06 18:58:52 +00:00
parent 708e6de8ea
commit fcad7cfb90
4 changed files with 54 additions and 14 deletions

View File

@ -41,16 +41,6 @@ span.wp-media-buttons-icon:before {
}
}
.wp-core-ui .button-link {
color: $link;
&:hover,
&:active,
&:focus {
color: $link-focus;
}
}
/* Forms */
input[type=checkbox]:checked::before {
@ -132,6 +122,35 @@ textarea:focus {
box-shadow: 0 0 0 1px #32373c;
}
@if ( $low-contrast-theme != "true" ) {
.button,
.button-secondary {
color: $highlight-color;
border-color: $highlight-color;
}
.button.hover,
.button:hover,
.button-secondary:hover{
border-color: darken($highlight-color, 10);
color: darken($highlight-color, 10);
}
.button.focus,
.button:focus,
.button-secondary:focus {
border-color: lighten($highlight-color, 10);
color: darken($highlight-color, 20);;
box-shadow: 0 0 0 1px lighten($highlight-color, 10);
}
.button-primary {
&:hover {
color: #fff;
}
}
}
.button-primary {
@include button( $button-color );
}
@ -171,11 +190,28 @@ textarea:focus {
/* List tables */
.wrap .add-new-h2:hover, /* deprecated */
.wrap .page-title-action:hover {
@if $low-contrast-theme == "true" {
.wrap .page-title-action:hover {
color: $menu-text;
background-color: $menu-background;
}
} @else {
.wrap .page-title-action,
.wrap .page-title-action:active {
border: 1px solid $highlight-color;
color: $highlight-color;
}
.wrap .page-title-action:hover {
color: darken($highlight-color, 10);
border-color: darken($highlight-color, 10);
}
.wrap .page-title-action:focus {
border-color: lighten($highlight-color, 10);
color: darken($highlight-color, 20);;
box-shadow: 0 0 0 1px lighten($highlight-color, 10);
}
}
.view-switch a.current:before {

View File

@ -61,3 +61,5 @@ $adminbar-recovery-exit-background: $menu-bubble-background !default;
$adminbar-recovery-exit-background-alt: mix(black, $adminbar-recovery-exit-background, 10%) !default;
$menu-customizer-text: mix( $base-color, $text-color, 40% ) !default;
$low-contrast-theme: "false" !default;

View File

@ -1,6 +1,7 @@
$base-color: #59524c;
$highlight-color: #c7a589;
$notification-color: #9ea476;
$low-contrast-theme: "true";
$form-checked: $base-color;

View File

@ -2,6 +2,7 @@ $base-color: #738e96;
$icon-color: #f2fcff;
$highlight-color: #9ebaa0;
$notification-color: #aa9d88;
$low-contrast-theme: "true";
$form-checked: $base-color;