Closed flying-sheep closed 2 years ago
Thanks for this PR!
Do you have a small example for me to reproduce the problem?
Maybe we should include this in the example notebook in the docs? There are already examples for DataFrame and for widgets, but not both at once.
Regarding :is(...)
: I don't have a preference.
An example would be this:
import pandas as pd
import ipywidgets as widgets
df = pd.DataFrame(...)
out = widgets.Output()
with out:
display(df)
tabs = widgets.Tab(children=[out])
tabs.set_title(0, 'Test')
tabs
displaying tabs
at the end results in HTML that contains no rendered_html
class anywhere.
Thanks for the example, that's great!
I'll add it to the docs: #633
Perfect! Do you need anything more from me or is this ready then?
Thanks, that's all I need for now.
I'd like to have a look into the equations problem to see if there is any overlap, and then I'll come back to this.
I still don't understand why equation rendering doesn't work within widgets.
It should be enabled everywhere within output_area
, but for some reason it doesn't seem to work.
Do you have an idea why that's the case?
No idea! Is that issue blocking this one? I’d assume this PR would be useful on its own.
I could take a look anyway if you give me a pointer to where equations are handled
No idea! Is that issue blocking this one?
No it isn't!
I’d assume this PR would be useful on its own.
Yes it is!
I could take a look anyway if you give me a pointer to where equations are handled
Equations are handled via MathJax, which is supposed to be activated on elements with the output_area
CSS class:
AFAICT, the widget outputs have this class, but somehow it doesn't seem to work ...
If one e.g. uses
ipywidgets
to wrap a DataFrame, the output area has norendered_html
class, butjp-RenderedHTMLCommon
Alternative
Using
:is(.rendered_html, .jp-RenderedHTMLCommon) table
would be a less verbose alternative that works in all current browser versions: https://caniuse.com/css-matches-pseudo