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

toggle-button-group: add equal heights to toggle buttons in group #2310

Open
6 tasks done
ArtBlue opened this issue Apr 10, 2024 · 2 comments
Open
6 tasks done

toggle-button-group: add equal heights to toggle buttons in group #2310

ArtBlue opened this issue Apr 10, 2024 · 2 comments
Assignees
Milestone

Comments

@ArtBlue
Copy link
Contributor

ArtBlue commented Apr 10, 2024

Description

Currently, it looks like our toggle-buttons within a toggle-button-group do not have the same height so when the content of one button is longer than others, the layout is not balanced.

For this, add the feature, either baked in, or using a modifier to allow for this use case.

Screenshots

Current:

image

Desired:

image

Figma link

No response

Engineering pre-requisites

  • Successful design review with Design System Team.
  • Supports dark mode.
  • Supports responsive design.
  • Tokens have been provided (or already exist).
  • Successful accessibility review with Core A11Y Team.
  • Successful frontend review with eBayUI Team.
@ArtBlue ArtBlue self-assigned this Apr 10, 2024
@ArtBlue
Copy link
Contributor Author

ArtBlue commented Apr 10, 2024

Dev Note

Most likely, we'll have to start using flex for toggle-button-group, which will be a slight abandoning of inline-block, which allows more easy wrapping. The solution might need to make clever use of flex on the <li>s, something like,

/* width percentages relative to 100% / [columns] */
/* subtracting the margins from both sides */
flex: 1 0 calc(33% -(var(--spacing-50)* 2));

@agliga agliga added this to the 17.5.0 milestone Apr 22, 2024
@ArtBlue
Copy link
Contributor Author

ArtBlue commented May 13, 2024

Dev Note

Most likely, we'll have to start using flex for toggle-button-group, which will be a slight abandoning of inline-block, which allows more easy wrapping. The solution might need to make clever use of flex on the <li>s, something like,

/* width percentages relative to 100% / [columns] */
/* subtracting the margins from both sides */
flex: 1 0 calc(33% -(var(--spacing-50)* 2));

This option only allowed equal heights across a single row. Once the row wraps, heights are reset. This means that each row can have a different height.

@agliga agliga modified the milestones: 17.5.0, 18.0.0 May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants