diff --git a/IPython/html/static/base/less/flexbox.less b/IPython/html/static/base/less/flexbox.less index 4623833..62eaad2 100644 --- a/IPython/html/static/base/less/flexbox.less +++ b/IPython/html/static/base/less/flexbox.less @@ -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; +} diff --git a/IPython/html/widgets/__init__.py b/IPython/html/widgets/__init__.py index 42fe522..40c81ce 100644 --- a/IPython/html/widgets/__init__.py +++ b/IPython/html/widgets/__init__.py @@ -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 diff --git a/IPython/html/widgets/widget_container.py b/IPython/html/widgets/widget_container.py index bbafdd6..2d67d35 100644 --- a/IPython/html/widgets/widget_container.py +++ b/IPython/html/widgets/widget_container.py @@ -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)