Bokeh renders the checkboxes like this
<div class="bk-bs-checkbox">
<label>
<input type="checkbox" value="0">
Label text
</label>
</div>
But I would like to select the label depending on the input state :focus
, :disabled
, :checked
, ...
Since there is no CSS parent selector, what I could do to render the checkbox in a custom way? I would like to avoid JavaScript. If the checkbox is rendered as the following code it would be easier to customize:
<div class="bk-bs-checkbox">
<input type="checkbox" value="0">
<label>
Label text
</label>
</div>
And I could this CSS code to select the label depending the checkbox state:
.bk-bs-checkbox input[type="checkbox"]:disabled + label::after {
background-color: red,
}
This is just an example to show one case of use.
Is there an easy way to achieve this? Actually I am looking for some mechanism in bokeh to inherit the template that renders that object in order to change it with my custom template.