Change button colors to increase hover/focus contrast and consistency (#25677)
This commit is contained in:
		@@ -47,11 +47,11 @@
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.button {
 | 
			
		||||
  background-color: darken($ui-highlight-color, 2%);
 | 
			
		||||
  background-color: $ui-button-background-color;
 | 
			
		||||
  border: 10px none;
 | 
			
		||||
  border-radius: 4px;
 | 
			
		||||
  box-sizing: border-box;
 | 
			
		||||
  color: $primary-text-color;
 | 
			
		||||
  color: $ui-button-color;
 | 
			
		||||
  cursor: pointer;
 | 
			
		||||
  display: inline-block;
 | 
			
		||||
  font-family: inherit;
 | 
			
		||||
@@ -71,14 +71,14 @@
 | 
			
		||||
  &:active,
 | 
			
		||||
  &:focus,
 | 
			
		||||
  &:hover {
 | 
			
		||||
    background-color: $ui-highlight-color;
 | 
			
		||||
    background-color: $ui-button-focus-background-color;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  &--destructive {
 | 
			
		||||
    &:active,
 | 
			
		||||
    &:focus,
 | 
			
		||||
    &:hover {
 | 
			
		||||
      background-color: $error-red;
 | 
			
		||||
      background-color: $ui-button-destructive-focus-background-color;
 | 
			
		||||
      transition: none;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
@@ -108,39 +108,18 @@
 | 
			
		||||
    outline: 0 !important;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  &.button-alternative {
 | 
			
		||||
    color: $inverted-text-color;
 | 
			
		||||
    background: $ui-primary-color;
 | 
			
		||||
 | 
			
		||||
    &:active,
 | 
			
		||||
    &:focus,
 | 
			
		||||
    &:hover {
 | 
			
		||||
      background-color: lighten($ui-primary-color, 4%);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  &.button-alternative-2 {
 | 
			
		||||
    background: $ui-base-lighter-color;
 | 
			
		||||
 | 
			
		||||
    &:active,
 | 
			
		||||
    &:focus,
 | 
			
		||||
    &:hover {
 | 
			
		||||
      background-color: lighten($ui-base-lighter-color, 4%);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  &.button-secondary {
 | 
			
		||||
    color: $darker-text-color;
 | 
			
		||||
    color: $ui-button-secondary-color;
 | 
			
		||||
    background: transparent;
 | 
			
		||||
    padding: 6px 17px;
 | 
			
		||||
    border: 1px solid lighten($ui-base-color, 12%);
 | 
			
		||||
    border: 1px solid $ui-button-secondary-border-color;
 | 
			
		||||
 | 
			
		||||
    &:active,
 | 
			
		||||
    &:focus,
 | 
			
		||||
    &:hover {
 | 
			
		||||
      background: lighten($ui-base-color, 4%);
 | 
			
		||||
      border-color: lighten($ui-base-color, 16%);
 | 
			
		||||
      color: lighten($darker-text-color, 4%);
 | 
			
		||||
      border-color: $ui-button-secondary-focus-background-color;
 | 
			
		||||
      color: $ui-button-secondary-focus-color;
 | 
			
		||||
      background-color: $ui-button-secondary-focus-background-color;
 | 
			
		||||
      text-decoration: none;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -152,14 +131,14 @@
 | 
			
		||||
  &.button-tertiary {
 | 
			
		||||
    background: transparent;
 | 
			
		||||
    padding: 6px 17px;
 | 
			
		||||
    color: $highlight-text-color;
 | 
			
		||||
    border: 1px solid $highlight-text-color;
 | 
			
		||||
    color: $ui-button-tertiary-color;
 | 
			
		||||
    border: 1px solid $ui-button-tertiary-border-color;
 | 
			
		||||
 | 
			
		||||
    &:active,
 | 
			
		||||
    &:focus,
 | 
			
		||||
    &:hover {
 | 
			
		||||
      background: $ui-highlight-color;
 | 
			
		||||
      color: $primary-text-color;
 | 
			
		||||
      background-color: $ui-button-tertiary-focus-background-color;
 | 
			
		||||
      color: $ui-button-tertiary-focus-color;
 | 
			
		||||
      border: 0;
 | 
			
		||||
      padding: 7px 18px;
 | 
			
		||||
    }
 | 
			
		||||
@@ -5810,15 +5789,15 @@ a.status-card.compact:hover {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .button.button-secondary {
 | 
			
		||||
    border-color: $inverted-text-color;
 | 
			
		||||
    color: $inverted-text-color;
 | 
			
		||||
    border-color: $ui-button-secondary-border-color;
 | 
			
		||||
    color: $ui-button-secondary-color;
 | 
			
		||||
    flex: 0 0 auto;
 | 
			
		||||
 | 
			
		||||
    &:hover,
 | 
			
		||||
    &:focus,
 | 
			
		||||
    &:active {
 | 
			
		||||
      border-color: lighten($inverted-text-color, 15%);
 | 
			
		||||
      color: lighten($inverted-text-color, 15%);
 | 
			
		||||
      border-color: $ui-button-secondary-focus-background-color;
 | 
			
		||||
      color: $ui-button-secondary-focus-color;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user