Skip to content
Closed
Changes from all commits
Commits
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
44 changes: 24 additions & 20 deletions frontend/web/styles/project/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ button.btn {
white-space: nowrap;
color: white;
// Project button, to remove with project select bar
// Use `:focus-visible` (keyboard / programmatic focus only) instead of
// `:focus` so a mouse click doesn't leave the button visibly "pressed"
// until the user clicks elsewhere — focus persists on click by design,
// we just don't want it to look like a held-down state.
&:hover,
&:focus {
&:focus-visible {
background-color: $btn-hover-bg;
}
&:focus-visible {
Expand All @@ -20,7 +24,7 @@ button.btn {
&-link {
color: $primary;
&:hover,
&:focus {
&:focus-visible {
background: transparent;
}
&.btn:active {
Expand All @@ -32,7 +36,7 @@ button.btn {
&-danger {
color: white;
&:hover,
&:focus {
&:focus-visible {
color: white;
background-color: $btn-danger-hover;
}
Expand All @@ -45,7 +49,7 @@ button.btn {
&-success {
color: white;
&:hover,
&:focus {
&:focus-visible {
color: white;
background-color: $btn-success-hover;
}
Expand Down Expand Up @@ -73,7 +77,7 @@ button.btn {
color: $primary;
}
&:hover,
&:focus {
&:focus-visible {
background-color: $btn-outline-hover-bg;
color: $primary;
}
Expand All @@ -86,7 +90,7 @@ button.btn {
border-color: $alert-danger-border-color !important;
color: $danger !important;
&:hover,
&:focus {
&:focus-visible {
background-color: $danger-alfa-8;
}
&.btn:active {
Expand All @@ -100,7 +104,7 @@ button.btn {
background-color: $btn-secondary-bg !important;

&:hover,
&:focus {
&:focus-visible {
background-color: $btn-secondary-hover-bg !important;
color: $body-color;
}
Expand All @@ -115,7 +119,7 @@ button.btn {
background-color: $btn-tertiary-bg;
box-shadow: 0 10px 20px rgba(247, 213, 110, .2);
&:hover,
&:focus {
&:focus-visible {
background-color: $btn-tertiary-hover-bg;
color: $body-color;
}
Expand All @@ -128,7 +132,7 @@ button.btn {
&-success {
background-color: $success;
&:hover,
&:focus {
&:focus-visible {
background-color: $success400;
color: $text-icon-light;
}
Expand All @@ -154,7 +158,7 @@ button.btn {
path {
fill: $text-muted;
}
&:hover,&:focus {
&:hover,&:focus-visible {
background-color: $bg-light300;
path {
fill: $body-color;
Expand All @@ -175,7 +179,7 @@ button.btn {
}
}
}
&:focus {
&:focus-visible {
background-color: $basic-alpha-8 !important;
svg {
path {
Expand Down Expand Up @@ -221,7 +225,7 @@ button.btn {
}
&.btn:hover,
&.btn:active,
&.btn:focus {
&.btn:focus-visible {
background-color: $bg-light200;
color: $body-color;
& .btn-project-letter {
Expand Down Expand Up @@ -286,7 +290,7 @@ button.btn {
text-transform: inherit;
font-weight: 500;
&:hover,
&:focus {
&:focus-visible {
color: $link-color;
background: transparent;
text-decoration: underline;
Expand Down Expand Up @@ -341,7 +345,7 @@ $add-btn-size: 34px;
.dark {
.btn {
&:hover,
&:focus {
&:focus-visible {
background-color: $btn-hover-bg-dark;
}
&:active {
Expand All @@ -352,7 +356,7 @@ $add-btn-size: 34px;
path {
fill: $text-muted;
}
&:hover,&:focus {
&:hover,&:focus-visible {
background-color: $bg-dark300;
path {
fill: $body-color-dark;
Expand All @@ -363,7 +367,7 @@ $add-btn-size: 34px;
color: white;
background-color: $btn-secondary-bg-dark !important;
&:hover,
&:focus {
&:focus-visible {
background-color: $btn-secondary-hover-bg-dark !important;
}
&:active {
Expand All @@ -373,7 +377,7 @@ $add-btn-size: 34px;
}
&.btn-success {
&:hover,
&:focus {
&:focus-visible {
background-color: $success400;
color: $text-icon-light;
}
Expand All @@ -391,7 +395,7 @@ $add-btn-size: 34px;
border-color: $primary400;
background-color: $btn-outline-hover-bg-dark;
}
&:focus {
&:focus-visible {
background-color: $btn-outline-focus-bg-dark;
}

Expand All @@ -404,7 +408,7 @@ $add-btn-size: 34px;
background-color: transparent;
&:hover,
&:active,
&:focus {
&:focus-visible {
background-color: transparent;
color: $dark-highlight-color;
}
Expand Down Expand Up @@ -432,7 +436,7 @@ $add-btn-size: 34px;
}

&.btn:hover,
&.btn:focus,&.btn:active {
&.btn:focus-visible,&.btn:active {
background-color: $bg-dark200;
color: $text-icon-light;
& .btn-project-letter {
Expand Down
Loading