3

I'm trying to change the text color of a button widget in a jupyter notebook. According to the ipywidgets documentation the button widget has the following style attributes:

['_model_module',
 '_model_module_version',
 '_model_name',
 '_view_count',
 '_view_module',
 '_view_module_version',
 '_view_name',
 'button_color',
 'font_family',
 'font_size',
 'font_style',
 'font_variant',
 'font_weight',
 'text_color',
 'text_decoration']

https://ipywidgets.readthedocs.io/en/latest/examples/Widget%20Styling.html#The-style-attribute

However when I execute the following code in a jupyter notebook get much less attributes: Output I get

That means that I cannot modify parameters like the text color or size...

Any idea of what could be happening so that I get so few attributes compared to the documentation? I have the last version of Ipywidgets installed.

Sergio Manchado
  • 143
  • 1
  • 7
  • I know you said latest, but please can you state exactly what version of ipwidgets you are using? – ac24 Nov 10 '21 at 20:26
  • If you launch the docs page in binder (https://mybinder.org/v2/gh/jupyter-widgets/ipywidgets/8.0.0a6?urlpath=lab/tree/docs/source/examples/Widget%20Styling.ipynb) you will see all the style choices, but the version running there is v8.0.0a6 so perhaps if you have v7.6 installed that would explain it. The change for the styling appears in this PR (https://github.com/jupyter-widgets/ipywidgets/pull/2728) which is slated for the v8.0 release. – ac24 Nov 10 '21 at 20:32
  • 1
    @ac24 I have 7.6.5 version installed. I Will try with version 8 – Sergio Manchado Nov 10 '21 at 20:41

0 Answers0