Is there any way to frame the switch on focus?
for example it doesen't work:
CSSsd-boolean__control:focus + .sd-boolean__switch {
outline: red solid 2px;
}
Is there any way to frame the switch on focus?
for example it doesen't work:
CSSsd-boolean__control:focus + .sd-boolean__switch {
outline: red solid 2px;
}
Hello,
You can apply the following CSS to change the color of a focused Boolean element:
CSS.sd-boolean.sd-boolean--allowhover:focus-within {
box-shadow: var(--sjs-shadow-inner-reset, inset 0px 0px 0px 0px rgba(0, 0, 0, 0.15)), 0 0 0 2px red;
}
Alternatively, modify the --sjs-primary-backcolor
CSS variable. However, take note that this change would also affect other placed of a questionnaire because this color is also used in other places.
CSS#surveyElement{
--sjs-primary-backcolor: red;
}
Should you have any further questions, please let me know.
Hello,
When a Boolean question receives focus, it appears as follows:
Would you please elaborate on the required output?
I use my own styles in the survey.
I managed to change styles for radio button and checkbox on focus, but for boolean it doesen't work.
There is how it works for checkbox:
.sd-checkbox__control:focus-visible + .sd-checkbox__decorator { outline: red solid 2px; }