Skip to content

Commit

Permalink
Button style improvments.
Browse files Browse the repository at this point in the history
  • Loading branch information
frjo committed Dec 11, 2024
1 parent 3a7bf40 commit 7a0b81b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion assets/sass/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ $colors: (
mobile-menu-cover: rgba($black, .2),

button: $brand,
button-hover: $brand-alt,
button-hover: $brand-dark,
button-text: $white,
button-text-hover: $white,
button-disabled: $grey,
Expand Down
4 changes: 0 additions & 4 deletions assets/sass/_zen.scss
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,6 @@ main {
background-color: var(--color-warning-bg);
}
}

button {
@extend %button--shadow;
}
}

.js-submitted {
Expand Down
18 changes: 17 additions & 1 deletion assets/sass/components/button/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,29 @@ button,

&--shadow {
&:hover {
box-shadow: 2px 2px 5px 1px var(--color-button-hover);
box-shadow: 2px 2px 5px 1px var(--color-button-disabled);
}

&:active {
box-shadow: inset 2px 2px 5px 1px var(--color-button);
}
}

&--plain {
appearance: none;
padding: .5rem;
color: currentcolor;
background-color: unset;
border: unset;

&:hover,
&:focus-visible,
&:active {
color: currentcolor;
background-color: unset;
scale: 1.15;
}
}
}

// The disabled variation should always go last, so that it overrides any
Expand Down

0 comments on commit 7a0b81b

Please sign in to comment.