Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buttons: Improve unstyled button styles to visually match link appearance #201

Merged
merged 3 commits into from
Mar 23, 2021
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 5.0.2

### Bug Fixes

- Fix the appearance of unstyled buttons to appear visually identical to a link.

## 5.0.1

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "identity-style-guide",
"version": "5.0.1",
"version": "5.0.2",
"description": "The global style of login.gov",
"main": "./build/cjs/index.js",
"module": "./build/esm/index.js",
Expand Down
4 changes: 2 additions & 2 deletions src/scss/components/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
// Since we override base button styles, we must re-apply the unstyled button styles.
@include button-unstyled;
position: relative;
text-underline-offset: 3px;

// USWDS currently only sets hover and active unstyled button styles for the browser-native
// states, and not with the modifier classes. It also does not apply these styles to the disabled
Expand All @@ -31,7 +30,8 @@
&.usa-button--active,
&:disabled,
&.usa-button--disabled {
@include no-knockout-font-smoothing;
-moz-osx-font-smoothing: inherit;
-webkit-font-smoothing: inherit;
Comment on lines +33 to +34
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These styles only apply for hover, active, and disabled 🤦 Should have also duplicated above, after the @include button-unstyled. Was misled by the fact that this is substituting the behavior of no-knockout-font-smoothing.

background-color: transparent;
box-shadow: none;
text-decoration: underline;
Expand Down