Skip to content

Commit

Permalink
Wrap tabs as needed
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardgerardatomicmachinescom committed Jul 10, 2024
1 parent c4530e6 commit 99f9e0e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ipyplot/_html_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,12 @@ def _create_tabs(
border-radius: 4px 4px 0 0;
position: relative;
top: 1px;
display: inline-flex;
}
input.ipyplot-tab-%(0)s:checked + label.ipyplot-tab-label-%(0)s {
background: #FFF;
border-bottom: 1px solid transparent;
display: inline-flex;
}
input.ipyplot-tab-%(0)s ~ .tab {
border-top: 1px solid #999;
Expand Down Expand Up @@ -222,7 +224,7 @@ def _create_html_viewer(
return html_viewer


def _display_html(html: str):
def _display_html(html: str, debug_html: bool = False):
"""Simply displays provided HTML string using IPython.display function.
Parameters
Expand All @@ -235,7 +237,8 @@ def _display_html(html: str):
handle: DisplayHandle
Returns a handle on updatable displays
"""
display(HTML(_create_html_viewer(html)))
if debug_html:
display(HTML(_create_html_viewer(html)))
return display(HTML(html))


Expand Down

0 comments on commit 99f9e0e

Please sign in to comment.