##// END OF EJS Templates
Added baseline and stretch
Jonathan Frederic -
Show More
@@ -184,6 +184,30 b' Browsers not listed, including Safari, are supported via the styling under the'
184 justify-content: center;
184 justify-content: center;
185 }
185 }
186
186
187 .hbox.baseline,
188 .vbox.baseline,
189 .baseline {
190 /* Old browsers */
191 -webkit-box-pack: baseline;
192 -moz-box-pack: baseline;
193 box-pack: baseline;
194
195 /* Modern browsers */
196 justify-content: baseline;
197 }
198
199 .hbox.stretch,
200 .vbox.stretch,
201 .stretch {
202 /* Old browsers */
203 -webkit-box-pack: stretch;
204 -moz-box-pack: stretch;
205 box-pack: stretch;
206
207 /* Modern browsers */
208 justify-content: stretch;
209 }
210
187 .hbox.align-start,
211 .hbox.align-start,
188 .vbox.align-start,
212 .vbox.align-start,
189 .align-start {
213 .align-start {
@@ -219,3 +243,27 b' Browsers not listed, including Safari, are supported via the styling under the'
219 /* Modern browsers */
243 /* Modern browsers */
220 align-items: center;
244 align-items: center;
221 }
245 }
246
247 .hbox.align-baseline,
248 .vbox.align-baseline,
249 .align-baseline {
250 /* Old browsers */
251 -webkit-box-align: baseline;
252 -moz-box-align: baseline;
253 box-align: baseline;
254
255 /* Modern browsers */
256 align-items: baseline;
257 }
258
259 .hbox.align-stretch,
260 .vbox.align-stretch,
261 .align-stretch {
262 /* Old browsers */
263 -webkit-box-align: stretch;
264 -moz-box-align: stretch;
265 box-align: stretch;
266
267 /* Modern browsers */
268 align-items: stretch;
269 }
@@ -2,7 +2,7 b' from .widget import Widget, DOMWidget, CallbackDispatcher'
2
2
3 from .widget_bool import CheckboxWidget, ToggleButtonWidget
3 from .widget_bool import CheckboxWidget, ToggleButtonWidget
4 from .widget_button import ButtonWidget
4 from .widget_button import ButtonWidget
5 from .widget_container import ContainerWidget, PopupWidget, FlexContainerWidget, HBoxContainerWidget, VBoxContainerWidget
5 from .widget_container import ContainerWidget, PopupWidget, FlexContainerWidget, HBoxWidget, VBoxWidget
6 from .widget_float import FloatTextWidget, BoundedFloatTextWidget, FloatSliderWidget, FloatProgressWidget
6 from .widget_float import FloatTextWidget, BoundedFloatTextWidget, FloatSliderWidget, FloatProgressWidget
7 from .widget_image import ImageWidget
7 from .widget_image import ImageWidget
8 from .widget_int import IntTextWidget, BoundedIntTextWidget, IntSliderWidget, IntProgressWidget
8 from .widget_int import IntTextWidget, BoundedIntTextWidget, IntSliderWidget, IntProgressWidget
@@ -42,14 +42,18 b' class FlexContainerWidget(ContainerWidget):'
42 if self.flex != new:
42 if self.flex != new:
43 self.flex = new
43 self.flex = new
44
44
45 _locations = ['start', 'center', 'end']
45 _locations = ['start', 'center', 'end', 'baseline', 'stretch']
46 pack = CaselessStrEnum(values=_locations, default_value='start', allow_none=False, sync=True)
46 pack = CaselessStrEnum(
47 align = CaselessStrEnum(values=_locations, default_value='start', allow_none=False, sync=True)
47 values=_locations,
48 default_value='start', allow_none=False, sync=True)
49 align = CaselessStrEnum(
50 values=_locations,
51 default_value='start', allow_none=False, sync=True)
48
52
49
53
50 class VBoxContainerWidget(FlexContainerWidget):
54 class VBoxWidget(FlexContainerWidget):
51 _view_name = Unicode('VBoxContainerView', sync=True)
55 _view_name = Unicode('VBoxContainerView', sync=True)
52
56
53
57
54 class HBoxContainerWidget(FlexContainerWidget):
58 class HBoxWidget(FlexContainerWidget):
55 _view_name = Unicode('HBoxContainerView', sync=True)
59 _view_name = Unicode('HBoxContainerView', sync=True)
General Comments 0
You need to be logged in to leave comments. Login now