Change font attributes in jupyter laptop shortcut widgets

I am trying to change the font attributes (weight, color, etc.) of a jupyter shortcut widget in python 2.7. As an example, I tried the following:

import ipywidgets as widgets
myLabel= widgets.Label(value = 'Some Label',color = '#ff0000') #change font color to red
myLabel

When I run this bit of code, I get no errors, however the label color remains black by default.

+4
source share
1 answer

one of the widget developers says here that all layout options must be executed in the layout attribute .

I'm currently exploring the capabilities of this attribute, but there seems to be no way to change the font, font color, or font size.

Maybe you need to write your own css file.

0

Source: https://habr.com/ru/post/1649686/


All Articles