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
34 changes: 19 additions & 15 deletions frontend/web/styles/project/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ button.btn {
height: $btn-line-height;
white-space: nowrap;
color: white;
// Bootstrap's focus ring is a wide box-shadow glow; this replaces it with
// the same outline BareButton uses, so icon-only buttons show focus too.
&:focus-visible {
box-shadow: none;
outline: 2px solid var(--color-border-action);
outline-offset: 2px;
}

&-link {
color: $primary;
&:hover,
&:focus {
&:focus-visible {
background: transparent;
}
&.btn:active {
Expand All @@ -28,7 +32,7 @@ button.btn {
&-danger {
color: white;
&:hover,
&:focus {
&:focus-visible {
color: white;
background-color: $btn-danger-hover;
}
Expand All @@ -44,7 +48,7 @@ button.btn {
&-success {
color: white;
&:hover,
&:focus {
&:focus-visible {
color: white;
background-color: $btn-success-hover;
}
Expand Down Expand Up @@ -72,7 +76,7 @@ button.btn {
color: $primary;
}
&:hover,
&:focus {
&:focus-visible {
background-color: $btn-outline-hover-bg;
color: $primary;
}
Expand All @@ -85,7 +89,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 @@ -99,7 +103,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 @@ -114,7 +118,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 @@ -127,7 +131,7 @@ button.btn {
&-success {
background-color: $btn-success;
&:hover,
&:focus {
&:focus-visible {
background-color: $btn-success-hover;
color: $text-icon-light;
}
Expand Down Expand Up @@ -156,7 +160,7 @@ button.btn {
path {
fill: var(--color-icon-secondary);
}
&:hover,&:focus {
&:hover,&:focus-visible {
background-color: $bg-light300;
path {
fill: var(--color-icon-default);
Expand All @@ -180,7 +184,7 @@ button.btn {
}
}
}
&:focus {
&:focus-visible {
background-color: $basic-alpha-8 !important;
svg {
path {
Expand Down Expand Up @@ -296,7 +300,7 @@ button.btn-link {
text-transform: inherit;
font-weight: 500;
&:hover,
&:focus {
&:focus-visible {
color: var(--color-text-action);
background: transparent;
text-decoration: underline;
Expand Down Expand Up @@ -352,15 +356,15 @@ $add-btn-size: 34px;
.btn {
&.btn-icon {
color: $body-color-dark;
&:hover,&:focus {
&:hover,&:focus-visible {
background-color: $bg-dark300;
}
}
&.btn-secondary {
color: white;
background-color: $btn-secondary-bg-dark !important;
&:hover,
&:focus {
&:focus-visible {
background-color: $btn-secondary-hover-bg-dark !important;
}
&:active {
Expand All @@ -371,7 +375,7 @@ $add-btn-size: 34px;
&.btn-success {
background-color: $btn-success;
&:hover,
&:focus {
&:focus-visible {
background-color: $btn-success-hover;
color: $text-icon-light;
}
Expand All @@ -393,7 +397,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;
}
&:active {
Expand Down
Loading