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(styles): wrap button group overflow #3062

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alizedebray
Copy link
Contributor

No description provided.

@alizedebray alizedebray requested a review from a team as a code owner May 3, 2024 14:53
@alizedebray alizedebray linked an issue May 3, 2024 that may be closed by this pull request
Copy link

changeset-bot bot commented May 3, 2024

🦋 Changeset detected

Latest commit: a0890f7

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

This PR includes changesets to release 14 packages
Name Type
@swisspost/design-system-styles Patch
@swisspost/design-system-components-angular-workspace Patch
@swisspost/design-system-components Patch
@swisspost/design-system-demo Patch
@swisspost/design-system-documentation Patch
@swisspost/internet-header Patch
@swisspost/design-system-intranet-header-workspace Patch
@swisspost/design-system-nextjs-integration Patch
@swisspost/design-system-intranet-header Patch
@swisspost/design-system-components-react Patch
@swisspost/design-system-components-angular Patch
@swisspost/design-system-intranet-header-showcase Patch
@swisspost/design-system-icons Patch
@swisspost/design-system-migrations 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

@swisspost-bot
Copy link
Contributor

swisspost-bot commented May 3, 2024

Related Previews

Copy link

sonarcloud bot commented May 3, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

Choose a reason for hiding this comment

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

Would be nice if we could avoid the offset on the second line, caused by margin-left: -2px:
image

This could be done like so:

// button-group.scss

@use './../variables/components/button';

// make sure this overrides the bootstrap styles for margin-left
.btn-group {
  margin-inline: button.$btn-border-width * 0.5;

  > :not(.btn-check:first-child),
  > :not(.btn-check:first-child) + .btn {
    margin-inline: button.$btn-border-width * -0.5;
  }
}

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.

Button group is not responsive by default
3 participants