Styling Components in Perspective

Some components in perspective like the Toggle Switch component have properties that are unaffected by CSS classes like the selected and unselected properties which refer to a color.

Do I need to use a tag binding? Or am I missing something you can do with CSS?

In Chrome, if you right-click an element and select “Inspect” then you can see the DOM, including styles, in the panel at the right. Once you find it, you can then alter the style in stylesheet.css. In the case of the toggle switch:

.ia_toggleSwitch__thumb .ia_toggleSwitch__thumb--selected

2 Likes

Thank you, I don’t know why I wasn’t thinking of this :grinning_face:

Keep in mind that will alter all instances. When I do this for specific views, I create a blank style that I can apply to a component/container, and then reference that in stylesheet.css using the .psc- prefix:

.psc-CSS\/MyBlankStyle .ia_toggleSwitch__thumb .ia_toggleSwitch__thumb--selected
3 Likes