Hello,
I am currently trying to understand how CSS styling can be applied to a bokeh server. After reading the documentation it seems like objects can be assigned a css class through the css_classes argument and then CSS code can be created in a GlobalInlineStyleSheet.
I have searched the forum here but cannot seem to find a simple example explaining how to apply it. I have included an example where i would like to change the styling of a button. When serving this file and inspecting elements i can see the CSS code provided. However it is not applied to the button.
Im on version 3.2.2
from bokeh.layouts import layout
from bokeh.plotting import curdoc
from bokeh.models import Button,GlobalInlineStyleSheet
style = GlobalInlineStyleSheet(css=""".custom_button_1 {
background-color: lightblue;
font-weight: bold;
color:navy;
border-style:solid;
border-width: 10px;
border-color:navy;
}""")
button = Button(label = 'hello', stylesheets = [style],css_classes = ['custom_button_1'])
main = layout(button)
curdoc().add_root(main)