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

Button sizing when in group #2003

Closed
Tracked by #2360
bartcuijpers opened this issue Sep 4, 2023 · 8 comments
Closed
Tracked by #2360

Button sizing when in group #2003

bartcuijpers opened this issue Sep 4, 2023 · 8 comments
Labels
feature request Request a feature or introduce and update to the project.
Milestone

Comments

@bartcuijpers
Copy link

Describe the feature in detail (code, mocks, or screenshots encouraged)

It seems impossible to adjust the button sizing when they are grouped. It would be a nice additional feature.

What type of pull request would this be?

None

Provide relevant links or additional information.

No response

@bartcuijpers bartcuijpers added the feature request Request a feature or introduce and update to the project. label Sep 4, 2023
@endigo9740
Copy link
Contributor

@bartcuijpers can you expand with an example. In most cases I'm aware of the group controls the sizing.

@endigo9740
Copy link
Contributor

The requested example was not replied so I'm closing this due to inactivity. If an example is provided in the future I'm happy to reopen. But currently it's not clear what's being requested here.

@endigo9740 endigo9740 added the wontfix This will not be worked on label Sep 7, 2023
@bartcuijpers
Copy link
Author

Individual buttons can be sized using the btn-sm, btn-lg and btn-xl classes. These classes don't work when multiple buttons are grouped in a buttongroup. It would be nice to be able to size the entire button group, just like Bootstrap.

@endigo9740 endigo9740 removed the wontfix This will not be worked on label Sep 9, 2023
@endigo9740 endigo9740 reopened this Sep 9, 2023
@campbelljlowman
Copy link

I second this request. I'm trying to make the "metropolitan" and "atlantic" buttons small, however it seems the 'btn-sm' class is overridden by the 'btn-group' class in the parent.

I can work around this by making the 'btn-sm' class important on the child button, however ideally it would work just by setting a button size class on either the button group or individual child buttons

image

@endigo9740
Copy link
Contributor

endigo9740 commented Oct 19, 2023

@campbelljlowman thanks, this should be something we can support. I appreciate the detailed explanation.

@campbelljlowman
Copy link

While working with this I've noticed another behavior that I think could be considered a bug. If I have a button group and want to change the color of one of them to indicate it's been selected using a different variant class, it works, however if I hover over the highlighted button, the background color goes back to the button group color.

This is confusing when trying to change the color of the button to indicate it's been clicked, because the background will stay the previous color until the user moves their cursor off the button. I confirmed this is not the case with regular buttons. Not sure if this is the correct place to discuss

@endigo9740
Copy link
Contributor

endigo9740 commented Oct 19, 2023

@campbelljlowman

While working with this I've noticed another behavior that I think could be considered a bug. If I have a button group and want to change the color of one of them to indicate it's been selected using a different variant class, it works, however if I hover over the highlighted button, the background color goes back to the button group color.

Right, we've seen this behavior before. The trick is to make sure to apply ! (important) to the style applied to the child element. This will resolve the issue.

<div class="btn-group variant-filled">
	<button>Months</button>
	<button class="!variant-filled-primary">Days</button>
	<button>Years</button>
</div>

This is somewhat related, but I'd also encourage you keep an eye out for this change in the new release next week. This resolves the disabled state for child buttons in a button group:

@endigo9740 endigo9740 added this to the v3.0 (Next) milestone Dec 19, 2023
@endigo9740
Copy link
Contributor

In an effort to prepare for Skeleton v3, we're consolidate some related issues down to a single ticket. This will ensure that we can see the full context of requests when the time comes to refactor and update this feature going forward. If you wish to add additional feedback or suggestions, please so here:

@endigo9740 endigo9740 mentioned this issue Jan 3, 2024
27 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request a feature or introduce and update to the project.
Projects
None yet
Development

No branches or pull requests

3 participants