Merge pull request #7872 from jdfreder/interact-styling

Remove padding without breaking interact style.
This commit is contained in:
Jonathan Frederic 2015-02-25 15:35:36 -08:00
commit f2dec681d2
5 changed files with 17 additions and 2 deletions

View File

@ -1195,6 +1195,10 @@ h6:hover .anchor-link {
font-size: 100%;
font-style: italic;
}
.widget-interact > div,
.widget-interact > input {
padding: 2.5px;
}
.widget-area {
/*
LESS file that styles IPython notebook widgets and the area they sit in.

View File

@ -9978,6 +9978,10 @@ h6:hover .anchor-link {
font-size: 100%;
font-style: italic;
}
.widget-interact > div,
.widget-interact > input {
padding: 2.5px;
}
.widget-area {
/*
LESS file that styles IPython notebook widgets and the area they sit in.

View File

@ -1,6 +1,13 @@
@widget-width: 350px;
@widget-width-short: 150px;
// Pad interact widgets by default.
.widget-interact {
>div, >input {
padding: 2.5px;
}
}
.widget-area {
/*
LESS file that styles IPython notebook widgets and the area they sit in.

View File

@ -181,7 +181,7 @@ def interactive(__interact_f, **kwargs):
co = kwargs.pop('clear_output', True)
manual = kwargs.pop('__manual', False)
kwargs_widgets = []
container = Box()
container = Box(_dom_classes=['widget-interact'])
container.result = None
container.args = []
container.kwargs = dict()

View File

@ -435,7 +435,7 @@ class DOMWidget(Widget):
width = CUnicode(sync=True)
height = CUnicode(sync=True)
# A default padding of 2.5 px makes the widgets look nice when displayed inline.
padding = CUnicode("2.5px", sync=True)
padding = CUnicode(sync=True)
margin = CUnicode(sync=True)
color = Unicode(sync=True)