Skip to content

Commit eecd9f3

Browse files
committed
Don't set inline styles in output_widget() (widgets have their own Layout() API that gets used to set inline styles on child elements)
1 parent 8bdb855 commit eecd9f3

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

ipyshiny/_ipyshiny.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
) # pyright: reportMissingTypeStubs=false, reportUnknownVariableType=false
1717
from ipywidgets._version import __protocol_version__
1818

19-
from htmltools import tags, Tag, TagList, css
19+
from htmltools import tags, Tag, TagList
2020
from htmltools._util import _package_dir
2121
from shiny import event, reactive
2222

@@ -29,19 +29,12 @@
2929
from ._comm import ShinyComm, ShinyCommManager, BufferType
3030

3131

32-
def output_widget(
33-
id: str, *, width: str = "100%", height: str = "400px", inline: bool = False
34-
) -> Tag:
35-
# TODO: we should probably have a way to customize the container tag, like you can
36-
# in htmlwidgets
32+
def output_widget(id: str) -> Tag:
3733
return tags.div(
3834
*libembed_dependency(),
3935
output_binding_dependency(),
4036
id=id,
4137
class_="shiny-ipywidget-output",
42-
style=css(
43-
width=width, height=height, display="inline-block" if inline else None
44-
),
4538
)
4639

4740

0 commit comments

Comments
 (0)