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

fix(button): update button sizes #103

Merged
merged 30 commits into from
Jul 22, 2022
Merged

fix(button): update button sizes #103

merged 30 commits into from
Jul 22, 2022

Conversation

gfellerph
Copy link
Member

This change updates button dimensions according to the design and reduces the file size of the button.css to ~7kb uncompressed because the arrow icon is now made with CSS and can make use of currentColor instead of a background icon which had to be "colored" by inversion.

This change reduces the file size of the button.css to ~7kb uncompressed because the arrow icon is now made with CSS and can make use of currentColor instead of a background icon which had to be "colored" by inversion.
@gfellerph gfellerph linked an issue May 23, 2022 that may be closed by this pull request
@changeset-bot
Copy link

changeset-bot bot commented May 23, 2022

🦋 Changeset detected

Latest commit: 0cde4d3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@swisspost/web-demo Patch
@swisspost/web-styles Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

🚀 Preview environment ready: https://preview-103--swisspost-web-frontend.netlify.app/

@gfellerph gfellerph requested review from a team, Janobob and alizedebray May 23, 2022 12:16
@gfellerph
Copy link
Member Author

@moniesan moniesan self-requested a review May 24, 2022 07:58
Copy link

@wueestd wueestd left a comment

Choose a reason for hiding this comment

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

Deftaul State

@gfellerph
Copy link
Member Author

gfellerph commented Jun 9, 2022

  • Safari shows blue text on some button variants
  • Primary buttons on dark backgrounds should fade from white to 0.8 white on hover, not the other way round

@gfellerph gfellerph requested a review from wueestd June 14, 2022 12:46
@github-actions
Copy link
Contributor

🚀 Preview environment ready: https://preview-103--swisspost-web-frontend.netlify.app/

@gfellerph gfellerph requested a review from Majis14 June 16, 2022 11:30
@gfellerph
Copy link
Member Author

@swisspost/design, this PR can be reviewed again at https://preview-103--swisspost-web-frontend.netlify.app/#/bootstrap-samples/buttons. Thx for reviewing.

Copy link

@wueestd wueestd left a comment

Choose a reason for hiding this comment

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

as discussed I would change the following:
negativ button: only change the button border to grey, let the text on white

Copy link
Contributor

@alizedebray alizedebray left a comment

Choose a reason for hiding this comment

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

👍 Our buttons look first-rate now!

I simply noticed these few differences with the specified design:
.btn-sm
- border-radius: 3px

.btn-default
- padding-right & padding-left: 2px narrower for all sizes (because of the side borders)
- color: 0.6 opacity on light backgrounds & on hover on dark backgrounds

.btn-default[disabled]
- color: 0.7 opacity on light backgrounds & 0.2 opacity on dark backgrounds
- border-color: 0.2 opacity on light backgrounds & 0.7 opacity on dark backgrounds
To get expected result, the buttons should also have 0.4 opacity

.btn-link
- padding-right & padding-left: 6px for all sizes
- color: 0.6 opacity on light backgrounds & on hover on dark backgrounds

.btn-link.btn-animated
- ::after: should probably not show on hover

All buttons have the same border radius.
The color of buttons is defined in the .btn base class and reacts to light/dark backgrounds. The link button should be consistent with other buttons in this behaviour and not inherit the color.
@gfellerph
Copy link
Member Author

@alizedebray, thanks for the review! The color of hovered buttons should stay opaque for accessibility (#103 (review)) and the disabled button styles were improved to be as contrastful as possible (primary on light bg is not accessible).

oliverschuerch
oliverschuerch previously approved these changes Jul 22, 2022
@oliverschuerch oliverschuerch dismissed their stale review July 22, 2022 08:24

Mistakenly approved

@sonarcloud
Copy link

sonarcloud bot commented Jul 22, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.5% 0.5% Duplication

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.

Update button sizes
6 participants