Skip to content

Commit bea96d7

Browse files
committed
Add Flexbox 2012 implementation (IE10)
References: - http://msdn.microsoft.com/en-us/library/ie/hh673531(v=vs.85).aspx - http://www.w3.org/TR/2012/WD-css3-flexbox-20120322/ "-ms-flex" is defined (see reference) as [ <positive-flex> <negative-flex> <preferred-size> ] | none ^ <number> ^ <number> ^ "<width> without inherit" "<width> without inherit" expands to "<length> || <percentage> || auto", so the final definition of "-ms-flex" is: [[ <number> <number>? ] || [ <length> || <percentage> || auto ] ] | none The other values are taken verbatim from the references.
1 parent a18a60d commit bea96d7

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

src/css/Properties.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ var Properties = {
263263

264264
//D
265265
"direction" : "ltr | rtl | inherit",
266-
"display" : "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | grid | inline-grid | none | inherit | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker | -webkit-box | -webkit-inline-box | flex | -webkit-flex | inline-flex | -webkit-inline-flex",
266+
"display" : "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | grid | inline-grid | none | inherit | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker | -webkit-box | -webkit-inline-box | -ms-flexbox | -ms-inline-flexbox | flex | -webkit-flex | inline-flex | -webkit-inline-flex",
267267
"dominant-baseline" : 1,
268268
"drop-initial-after-adjust" : "central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | <percentage> | <length>",
269269
"drop-initial-after-align" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
@@ -287,6 +287,12 @@ var Properties = {
287287
"flex-grow" : "<number>",
288288
"flex-shrink" : "<number>",
289289
"flex-wrap" : "nowrap | wrap | wrap-reverse",
290+
"-ms-flex" : "[[ <number> <number>? ] || [ <length> || <percentage> || auto ] ] | none",
291+
"-ms-flex-align" : "start | end | center | stretch | baseline",
292+
"-ms-flex-direction" : "row | column | row-reverse | column-reverse | inherit",
293+
"-ms-flex-order" : "<number>",
294+
"-ms-flex-pack" : "start | end | center | justify",
295+
"-ms-flex-wrap" : "nowrap | wrap | wrap-reverse",
290296
"float" : "left | right | none | inherit",
291297
"float-offset" : 1,
292298
"font" : 1,

tests/css/Validation.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,8 @@
590590
"-moz-marker",
591591
"-webkit-box",
592592
"-webkit-inline-box",
593+
"-ms-flexbox",
594+
"-ms-inline-flexbox",
593595
"flex",
594596
"-webkit-flex",
595597
"inline-flex",
@@ -598,7 +600,7 @@
598600
],
599601

600602
invalid: {
601-
"foo" : "Expected (inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | grid | inline-grid | none | inherit | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker | -webkit-box | -webkit-inline-box | flex | -webkit-flex | inline-flex | -webkit-inline-flex) but found 'foo'."
603+
"foo" : "Expected (inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | grid | inline-grid | none | inherit | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker | -webkit-box | -webkit-inline-box | -ms-flexbox | -ms-inline-flexbox | flex | -webkit-flex | inline-flex | -webkit-inline-flex) but found 'foo'."
602604
}
603605
}));
604606

0 commit comments

Comments
 (0)