Skip to content

Commit

Permalink
Reduce border width on default outline button (#205)
Browse files Browse the repository at this point in the history
* Reduce border width on normal outline button

**Why**: Per Figma design reference, the outline button should only have a border width of 1px, not 2px. The "Big" outline button should still have a 2px border.

* Revert CHANGELOG entry to "Unreleased"

See: https://github.com/18F/identity-style-guide/pull/205/files#r603407014
  • Loading branch information
aduth authored Mar 29, 2021
1 parent 085daf9 commit 85851f8
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Unreleased

### Bug Fixes

- Reduce the border width of the normal outline button to the intended width of `1px` (previously `2px`). The big variant of the outline button is unaffected by this change, and remains `2px`.

## 5.0.3

### Bug Fixes
Expand Down
40 changes: 40 additions & 0 deletions src/scss/components/_buttons.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
$button-stroke-big: inset 0 0 0 units($theme-button-stroke-width * 2);

.usa-button {
line-height: 1;

Expand Down Expand Up @@ -109,6 +111,44 @@
box-shadow: $button-stroke color('disabled');
color: color('disabled');
}

&.usa-button--big {
box-shadow: $button-stroke-big color('primary');

&:not([disabled]):focus,
&:not([disabled]).usa-focus {
box-shadow: $button-stroke-big color('primary'), roundable-focus-outline-box-shadows();
}

&:hover,
&.usa-button--hover {
box-shadow: $button-stroke-big color('primary-dark');
}

&:active,
&.usa-button--active {
box-shadow: $button-stroke-big color('primary-darker');
}

&:disabled,
&.usa-button--disabled {
box-shadow: $button-stroke-big color('disabled');
}

&.usa-button--inverse {
box-shadow: $button-stroke-big color('base-lighter');

&:hover,
&.usa-button--hover {
box-shadow: $button-stroke-big color($theme-link-reverse-hover-color);
}

&:active,
&.usa-button--active {
box-shadow: $button-stroke-big color($theme-link-reverse-active-color);
}
}
}
}

.usa-button--danger {
Expand Down
1 change: 1 addition & 0 deletions src/scss/uswds-theme/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ $theme-banner-font-family: 'ui';
$theme-button-font-family: 'ui';
$theme-button-border-radius: 'md';
$theme-button-small-width: 6;
$theme-button-stroke-width: 1px;

// Footer
$theme-footer-font-family: 'body';
Expand Down

0 comments on commit 85851f8

Please sign in to comment.