-
Notifications
You must be signed in to change notification settings - Fork 72
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
Switch Composable Gets Clipped When Using Bootstrap CSS #631
Comments
The Chrome browser version is : 131.0.6778.140 |
Thanks for the detailed report! Bootstrap's styling is fairly opinionated and unfortunately by default takes precedence over some of Silk's styles. However, you can give the Bootstrap styles lower precedence by importing it within a CSS layer, as described in this section of the README. With that change, I'd recommend importing the Bootstrap styles in a layer regardless, but we could also fix this specific issue by removing Switch's questionable use of |
@DennisTsar I imported the Bootstrap styles within a CSS layer as suggested, and it resolved my issue perfectly. Thanks again for your quick and helpful response! |
While using a CSS layer works well for me, I was wondering if there are any plans to remove the use of I agree that using layers is a better solution overall, but I’m curious if this specific property might be revisited down the line. |
You can definitely leave this bug open! We can close it after investigating the property. Either we should remove Thank you Dennis for the quick analysis btw. |
YOUR BUG DESCRIPTION HERE
If relevant, specify:
Steps to Reproduce
Expected Behavior
The Switch should render correctly at its default size of 46px × 24px as shown when Bootstrap is not included.
(the SwitchSize.LG is used, and the default text size of my Chrome browser is 16.px)
Actual Behavior
The size of the Switch gets clipped down to 39.984px × 17.984px when Bootstrap CSS is included, as attached screenshot below.

Additional Context
I have prepared the basic project that can reproduce the above issue, so please kindly refer to it if required.
https://github.com/masah517/SwitchKobwebDemo
The text was updated successfully, but these errors were encountered: