Skip to content

Use consistent "Success" green for icon backgrounds#306

Merged
aduth merged 2 commits intomainfrom
aduth-icon-bg-success-color
Mar 25, 2022
Merged

Use consistent "Success" green for icon backgrounds#306
aduth merged 2 commits intomainfrom
aduth-icon-bg-success-color

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Mar 25, 2022

Why: For consistency of our colors and available icons, and to avoid mismatching colors between badges.

Previously, there were three different colors used between badge borders and icon background:

  • #18852e (Used for border color, also the standard success color token)
  • #63BB60 (Used for the "Unphishable" icon background)
  • #38bf53 (Used for the "Success" badge icon background)

With these changes, we use #18852e (success token) consistently.

Screenshots:

Icon Before After
Unphishable Unphishable Unphishable
Success Success Success

Live preview:

**Why**: For consistency of our colors and available icons, and to avoid mismatching colors between badges.
@aduth
Copy link
Contributor Author

aduth commented Mar 25, 2022

Visual regression failure is, unsurprisingly, for the badge updates:

image

aduth added a commit that referenced this pull request Mar 25, 2022
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM

<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.5 17C13.1944 17 17 13.1944 17 8.5C17 3.80557 13.1944 0 8.5 0C3.80557 0 0 3.80557 0 8.5C0 13.1944 3.80557 17 8.5 17ZM12.75 8.34821C12.75 7.84541 12.3421 7.4375 11.8393 7.4375H11.3839V6.07143C11.3839 4.48148 10.09 3.1875 8.5 3.1875C6.91005 3.1875 5.61607 4.48148 5.61607 6.07143V7.4375H5.16072C4.65793 7.4375 4.25 7.84541 4.25 8.34821V11.9911C4.25 12.4939 4.65793 12.9018 5.16072 12.9018H11.8393C12.3421 12.9018 12.75 12.4939 12.75 11.9911V8.34821ZM9.86607 6.07143V7.4375H7.13393V6.07143C7.13393 5.31819 7.74677 4.70537 8.5 4.70537C9.25323 4.70537 9.86607 5.31819 9.86607 6.07143ZM7.64999 9.6232C7.64999 9.15376 8.03056 8.77319 8.5 8.77319C8.96944 8.77319 9.35001 9.15376 9.35001 9.6232V10.5946C9.35001 11.0641 8.96944 11.4446 8.5 11.4446C8.03056 11.4446 7.64999 11.0641 7.64999 10.5946V9.6232Z" fill="#63BB60"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="17" height="17"><path fill-rule="evenodd" d="M8.5 17a8.5 8.5 0 1 0 0-17 8.5 8.5 0 1 0 0 17zm4.25-8.652a.91.91 0 0 0-.911-.911h-.455V6.071A2.89 2.89 0 0 0 8.5 3.188a2.89 2.89 0 0 0-2.884 2.884v1.366h-.455a.91.91 0 0 0-.911.911v3.643a.91.91 0 0 0 .911.911h6.679a.91.91 0 0 0 .911-.911V8.348zM9.866 6.071v1.366H7.134V6.071A1.37 1.37 0 0 1 8.5 4.705a1.37 1.37 0 0 1 1.366 1.366zM7.65 9.623a.85.85 0 0 1 1.7 0v.971a.85.85 0 0 1-1.7 0v-.971z" fill="#18852e"/></svg> No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this new image need a viewBox?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ooh, great catch!

Yes, technically. We enforce it elsewhere, since it's needed for Internet Explorer support. Maybe we won't need it anymore once we can finally drop support though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This also reminds me: We should implement SVG optimization / validation in this project.

Copy link
Contributor Author

@aduth aduth Mar 25, 2022

Choose a reason for hiding this comment

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

Does this new image need a viewBox?

Restored in db98c0a.

This also reminds me: We should implement SVG optimization / validation in this project.

#307

Copy link
Contributor

@nickttng nickttng left a comment

Choose a reason for hiding this comment

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

LGTM. I've noted in LGDS Figma to update after this PR is merged.

@aduth aduth merged commit f9e7ec3 into main Mar 25, 2022
@aduth aduth deleted the aduth-icon-bg-success-color branch March 25, 2022 17:42
Copy link
Contributor

@anniehirshman-gsa anniehirshman-gsa left a comment

Choose a reason for hiding this comment

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

LGTMx3 thank you!

@aduth aduth mentioned this pull request Mar 31, 2022
aduth added a commit that referenced this pull request Aug 17, 2022
aduth added a commit that referenced this pull request Apr 3, 2023
aduth added a commit that referenced this pull request Apr 3, 2023
* Require Dart Sass

* Disable mobile-lg and desktop responsive utilities by default

* Remove asset-path-if-exists function

* Remove image-path backwards compatibility

* Remove unused gulp-replace

* Fix method math.divide -> math.div

fixup 2d63ae1

* Remove deprecated success-badge image

Ref: #306

* Remove usa-alert__paragraph

(1) the width does not match the width of a paragraph in prose anyways
(2) there's already a utility to achieve this effect

* Move breaking changes to correct location in CHANGELOG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants