Color-Scheme for Checkboxes and Radiobuttons #40996
-
Have I overlooked something, or is there no way to customize the color of checkboxes and radio buttons? In summary, I would like to have a color assignment like for buttons for all elements that are displayed with colors. |
Beta Was this translation helpful? Give feedback.
Answered by
julien-deramond
Nov 1, 2024
Replies: 1 comment 5 replies
-
IDK if this is what you had in mind, but based on your screenshot, if you override the values of these Sass variables, you could have different colors: $form-check-input-checked-bg-color: $red !default;
$form-switch-color: #fd0 !default;
$form-switch-focus-color: #0f0 !default;
$form-switch-checked-color: #fd0 !default; |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's a working example project with Sass customization. Hope it can help :)
https://stackblitz.com/edit/github-4kahu6?file=scss%2F_icon-list.scss,scss%2Fstyles.scss
(you might want to click the refresh button to get the CSS file loaded and see the rendering of the colored switches, this is just a bug with StackBlitz)
Based on the code that you shared, you might have forgotten to import
@import 'bootstrap/scss/forms';