mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
Added baseline and stretch
This commit is contained in:
parent
6faf86ee77
commit
37f00f73d7
@ -184,6 +184,30 @@ Browsers not listed, including Safari, are supported via the styling under the
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.hbox.baseline,
|
||||
.vbox.baseline,
|
||||
.baseline {
|
||||
/* Old browsers */
|
||||
-webkit-box-pack: baseline;
|
||||
-moz-box-pack: baseline;
|
||||
box-pack: baseline;
|
||||
|
||||
/* Modern browsers */
|
||||
justify-content: baseline;
|
||||
}
|
||||
|
||||
.hbox.stretch,
|
||||
.vbox.stretch,
|
||||
.stretch {
|
||||
/* Old browsers */
|
||||
-webkit-box-pack: stretch;
|
||||
-moz-box-pack: stretch;
|
||||
box-pack: stretch;
|
||||
|
||||
/* Modern browsers */
|
||||
justify-content: stretch;
|
||||
}
|
||||
|
||||
.hbox.align-start,
|
||||
.vbox.align-start,
|
||||
.align-start {
|
||||
@ -219,3 +243,27 @@ Browsers not listed, including Safari, are supported via the styling under the
|
||||
/* Modern browsers */
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.hbox.align-baseline,
|
||||
.vbox.align-baseline,
|
||||
.align-baseline {
|
||||
/* Old browsers */
|
||||
-webkit-box-align: baseline;
|
||||
-moz-box-align: baseline;
|
||||
box-align: baseline;
|
||||
|
||||
/* Modern browsers */
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.hbox.align-stretch,
|
||||
.vbox.align-stretch,
|
||||
.align-stretch {
|
||||
/* Old browsers */
|
||||
-webkit-box-align: stretch;
|
||||
-moz-box-align: stretch;
|
||||
box-align: stretch;
|
||||
|
||||
/* Modern browsers */
|
||||
align-items: stretch;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ from .widget import Widget, DOMWidget, CallbackDispatcher
|
||||
|
||||
from .widget_bool import CheckboxWidget, ToggleButtonWidget
|
||||
from .widget_button import ButtonWidget
|
||||
from .widget_container import ContainerWidget, PopupWidget, FlexContainerWidget, HBoxContainerWidget, VBoxContainerWidget
|
||||
from .widget_container import ContainerWidget, PopupWidget, FlexContainerWidget, HBoxWidget, VBoxWidget
|
||||
from .widget_float import FloatTextWidget, BoundedFloatTextWidget, FloatSliderWidget, FloatProgressWidget
|
||||
from .widget_image import ImageWidget
|
||||
from .widget_int import IntTextWidget, BoundedIntTextWidget, IntSliderWidget, IntProgressWidget
|
||||
|
@ -42,14 +42,18 @@ class FlexContainerWidget(ContainerWidget):
|
||||
if self.flex != new:
|
||||
self.flex = new
|
||||
|
||||
_locations = ['start', 'center', 'end']
|
||||
pack = CaselessStrEnum(values=_locations, default_value='start', allow_none=False, sync=True)
|
||||
align = CaselessStrEnum(values=_locations, default_value='start', allow_none=False, sync=True)
|
||||
_locations = ['start', 'center', 'end', 'baseline', 'stretch']
|
||||
pack = CaselessStrEnum(
|
||||
values=_locations,
|
||||
default_value='start', allow_none=False, sync=True)
|
||||
align = CaselessStrEnum(
|
||||
values=_locations,
|
||||
default_value='start', allow_none=False, sync=True)
|
||||
|
||||
|
||||
class VBoxContainerWidget(FlexContainerWidget):
|
||||
class VBoxWidget(FlexContainerWidget):
|
||||
_view_name = Unicode('VBoxContainerView', sync=True)
|
||||
|
||||
|
||||
class HBoxContainerWidget(FlexContainerWidget):
|
||||
class HBoxWidget(FlexContainerWidget):
|
||||
_view_name = Unicode('HBoxContainerView', sync=True)
|
||||
|
Loading…
Reference in New Issue
Block a user