-
Notifications
You must be signed in to change notification settings - Fork 13
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
Conversation
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.
🦋 Changeset detectedLatest commit: 0cde4d3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
🚀 Preview environment ready: https://preview-103--swisspost-web-frontend.netlify.app/ |
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.
Deftaul State
|
🚀 Preview environment ready: https://preview-103--swisspost-web-frontend.netlify.app/ |
@swisspost/design, this PR can be reviewed again at https://preview-103--swisspost-web-frontend.netlify.app/#/bootstrap-samples/buttons. Thx for reviewing. |
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.
as discussed I would change the following:
negativ button: only change the button border to grey, let the text on white
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.
👍 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
...bootstrap/components/buttons/buttons-demo/icon-buttons-text/icon-buttons-text.component.html
Outdated
Show resolved
Hide resolved
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.
@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). |
...app/bootstrap/components/buttons/buttons-demo/button-disabled/button-disabled.component.html
Outdated
Show resolved
Hide resolved
...app/bootstrap/components/buttons/buttons-demo/button-disabled/button-disabled.component.html
Outdated
Show resolved
Hide resolved
packages/web-demo/src/app/bootstrap/components/buttons/buttons-demo/buttons-demo.component.html
Outdated
Show resolved
Hide resolved
packages/web-demo/src/app/bootstrap/components/buttons/buttons-demo/buttons-demo.component.html
Outdated
Show resolved
Hide resolved
packages/web-demo/src/app/bootstrap/components/buttons/buttons-demo/buttons-demo.component.html
Show resolved
Hide resolved
Styles for both .btn-default and .btn-secondary are preserved for backwards compatibility.
Co-authored-by: Oliver Schürch <oli@skaos.ch>
…/common-web-frontend into 40-update-button-sizes
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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.