Developer forum

Forum » Swift » Swift Themes not considering Bootstrap Switches and Radio Buttons

Swift Themes not considering Bootstrap Switches and Radio Buttons

Pedro Meias
Pedro Meias
Reply

Hi,

DW 9.15.3

Swift 1.19.0

When we try to render switches based on bootstrap documentation https://getbootstrap.com/docs/5.1/forms/checks-radios/#switches they render as following (No theme selected for paragraph)

It seems the checked and not checked colors are always the same independent of the selected theme, below same example with a Dark Green Theme

The same is happening for Radio Buttons (screenshots are from Swift Cheat Sheets)

 

Dark Theme

 

 

 

 


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Yeah - BS comes with built in inline SVGs for these controls that specifies the stroke colors. So if you want them to behave differently, you will probably have to take care the built in SVGs using custom css.

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Also when we upgrade to 5.3 of BS, you will have new variables available to take control of this. See the same docs for 5.3: https://getbootstrap.com/docs/5.3/forms/checks-radios/#variables

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

And the last note - I do not think it is possible to use CSS vars for stroke colors in inline SVGs - and that is the culprit of this issue.

 

You must be logged in to post in the forum