Skip to content

Commit

Permalink
Remove/tweak dark light variables (#23229)
Browse files Browse the repository at this point in the history
* Retire the lighter variables.

* Change the dark colors to be dynamic.

* Revert the HSL.

* Fix focus for inserter.
  • Loading branch information
jasmussen authored Jun 18, 2020
1 parent e1a6a78 commit ef0704b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
10 changes: 3 additions & 7 deletions packages/base-styles/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -441,13 +441,9 @@
@mixin admin-scheme($color-primary) {
--wp-admin-theme-color: #{$color-primary};

// Ideally, we should limit these computed variables,
// because we can"t compute colors based on CSS variables.
// This requires refactoring some existing styles.
--wp-admin-theme-color-darker-20: #{darken($color-primary, 20%)};
--wp-admin-theme-color-darker-10: #{darken($color-primary, 10%)};
--wp-admin-theme-color-lighter-10: #{lighten($color-primary, 10%)};
--wp-admin-theme-color-lighter-40: #{lighten($color-primary, 40%)};
// Darker shades.
--wp-admin-theme-color-darker-10: #{darken($color-primary, 5%)};
--wp-admin-theme-color-darker-20: #{darken($color-primary, 10%)};
}

@mixin wordpress-admin-schemes() {
Expand Down
6 changes: 3 additions & 3 deletions packages/components/src/button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
&[aria-disabled="true"],
&[aria-disabled="true"]:enabled, // This catches a situation where a Button is aria-disabled, but not disabled.
&[aria-disabled="true"]:active:enabled {
color: var(--wp-admin-theme-color-lighter-40);
background: var(--wp-admin-theme-color-lighter-10);
border-color: var(--wp-admin-theme-color-lighter-10);
color: rgba($white, 0.4);
background: var(--wp-admin-theme-color);
border-color: var(--wp-admin-theme-color);
opacity: 1;

&:focus:enabled {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
}

&:focus:not(:disabled) {
box-shadow: 0 0 0 $border-width-focus var(--wp-admin-theme-color);
box-shadow: 0 0 0 $border-width-focus var(--wp-admin-theme-color), inset 0 0 0 $border-width $white;
outline: 1px solid transparent;
}

Expand Down

0 comments on commit ef0704b

Please sign in to comment.