rstudio / bslib

Tools for theming Shiny and R Markdown via Bootstrap 3, 4, or 5.
https://rstudio.github.io/bslib/
Other
472 stars 57 forks source link

fix(preset-shiny): Fix border of radio and checkbox buttons #1038

Closed gadenbuie closed 5 months ago

gadenbuie commented 5 months ago

Before

Note light border on checkbox and radio buttons.

image

image

After

image

image

Notes

The border of checkbox and radio buttons is driven by $form-check-input-border which uses var(--bs-border-color) by default (the same as the card border).

https://github.com/rstudio/bslib/blob/2e6b202a5ee213a86addefbae1bdc6b927b83064/inst/lib/bs5/scss/_variables.scss#L958

Input borders (select, text input) are set via $input-border-color

https://github.com/rstudio/bslib/blob/2e6b202a5ee213a86addefbae1bdc6b927b83064/inst/lib/bs5/scss/_variables.scss#L914

which we override in the Shiny preset.

https://github.com/rstudio/bslib/blob/2e6b202a5ee213a86addefbae1bdc6b927b83064/inst/builtin/bs5/shiny/_variables.scss#L89