-
Notifications
You must be signed in to change notification settings - Fork 17
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
Conversation
**Why**: So that unstyled buttons appear visually identical to links
Interesting that the tests pass 🤔 I would expect visual regressions to be flagged here. |
I tried running locally, got some timeouts, but also this:
🤷 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The diffs should be in your local relative I recall some recent discussion about possibly removing / moving / updating those pages, which might incidentally help clear up some of the flakiness around that page. |
Taking a look locally, I think the issue is that |
-moz-osx-font-smoothing: inherit; | ||
-webkit-font-smoothing: inherit; |
There was a problem hiding this comment.
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
.
**Why**: These were applied to modifier states for unstyled buttons in #201, but should have also been applied to the base styles, to override USWDS unstyled button styles.
**Why**: These were applied to modifier states for unstyled buttons in #201, but should have also been applied to the base styles, to override USWDS unstyled button styles.
**Why**: 18F/identity-design-system#202 and 18F/identity-design-system#201 intended to inherit font smoothing, but unfortunately miss these two states which are handled and inherited from USWDS.
* Upgrade to identity-style-guide 5.0.3 **Why**: Fix unstyled button link appearance * LG-3865: Update BassCSS link buttons to USWDS **Why**: We should be able to expect that the visual appearance of BassCSS `btn-link` and the USWDS unstyled button are identical. As such, migrating to the unstyled button can happen independently of the broader BassCSS migration to simplify future effort. Excludes SimpleForm buttons, since all SimpleForm buttons will apply the `btn btn-primary` class which may conflict with USWDS buttons. This is also why the class isn't yet deprecated in the erb-lint.yml file. See: https://github.com/18F/identity-idp/blob/ce7608a50ea9f7b8d8c747c63cc0c49549eac4a7/config/initializers/simple_form.rb#L5 * Revert hover color to default link color See inline comment * Update selector for back link test * Preserve link color for visited, unstyled buttons **Why**: See inline code comment * Apply inherited font smoothing to hover, active unstyled buttons **Why**: 18F/identity-design-system#202 and 18F/identity-design-system#201 intended to inherit font smoothing, but unfortunately miss these two states which are handled and inherited from USWDS.
Related Slack conversation: https://gsa-tts.slack.com/archives/CNCGEHG1G/p1616421634001700
Why: The use of an unstyled button is intended to take the visual appearance of a link. The proposed changes resolve some discrepancies that currently exist:
inherit
(see Buttons: Use "inherit" for font smoothing reset uswds/uswds#4115 for detail)Live Preview: https://federalist-2f194a10-945e-4413-be01-46ca6dae5358.app.cloud.gov/preview/18f/identity-style-guide/aduth-unstyled-buttons-links/components/buttons/
Screenshot:
This was originally observed in the IdP, where an equivalent link and unstyled button did not appear the same. See examples below which show a real link on the left vs. an unstyled button on the right. The IdP customizes the default font smoothing of text, which currently causes a difference in appearance between links and unstyled buttons (see uswds/uswds#4115). Separately, we should consider if this is actually something we should be doing, perhaps as part of the ongoing work to migrate to Public Sans font (see related guidance).