-
-
Notifications
You must be signed in to change notification settings - Fork 298
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
Resolve issue with button groups and child variant precedence #1725
Comments
Appending a bit of additional context here: We likely won't support mixing and matching button variants within a group as shown above. If the button does not have some unity between the group then they should be split and standalone. But we are seeing an issue with <div class="btn-group variant-ghost-primary">
<button class="variant-filled-primary">Monthly</button>
<button>Annually</button>
</div> Which could be useful for creating a radio group like grouping that indicates active selection state. It seems the I'd assume there's some Also note we likely won't be able to revisit this until the plugin changes in v2 are in place, so this PR is a prerequisite: |
Just reiterating that the original post above was not an scenario we were keen to support in Skeleton. If you wish to mix and match variants, create your own button grouping. However, per having a variant override to indicate state (like a radio field), this appears to be resolved - at least in Skeleton v2. You're now able to supply <div class="btn-group variant-ghost-primary">
<button class="!variant-filled-primary">Months</button>
<button>Days</button>
<button>Years</button>
</div> Not only does the text color then work as expected, but the child button with the variant also stays active even when hovering the button. It's a small change that makes this work exactly as expected. With this, no changes are needed on Skeleton's end. |
Current Behavior
Currently it's only possible to have one style for all the buttons in
btn-group
.Expected Behavior
Be able to use different styles for each button in
btn-group
.Steps To Reproduce
Link to Reproduction / Stackblitz
https://discord.com/channels/1003691521280856084/1125913854585618534
More Information
As you can see in the screenshot above, the colors are off.
--on-primary
doesn't work properly, borders aren't grouped etc.The text was updated successfully, but these errors were encountered: