2

Let's say I'd like to underline a word in one of my options in a RadioButtonGroup, is it possible?

I tried to use the Div class as an input, but it didn't work.

Thanks

etigrenier
  • 499
  • 1
  • 4
  • 14

1 Answers1

3

This PR "Add support for specifying CSS classes on all LayoutDOM" will be going into Bokeh 0.12.4 in Dec 2017 and provided a mechanism to add arbitrary CSS classes to any Bokeh LayoutDOM model (e.g. widgets) so that they can be more easily styled.

It will be available like:

from bokeh.models import Div
div = Div(text="some text")

# add these CSS classes to the widget div 
div.css_classes = ["my-custom"]

Then you can add styles for .my-custom in your template or whatever.

bigreddot
  • 33,642
  • 5
  • 69
  • 122
  • FYI this PR has been merged and the feature is available in the "dev build" `0.12.4dev7` – bigreddot Dec 06 '16 at 22:35
  • 1
    Thanks. Plz elaborate further on the 'whatever' part: I serve the document through "bokeh serve" and see an empty `` pair of tags in the ``. How do I populate it? – Antony Hatchkins Feb 18 '18 at 04:10