You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ef0496d
Browse filesBrowse the repository at this point in the historyBrowse files
fix(css): prefix and drop the 2009 flexbox draft's names (#22320)
* fix(css): prefix and drop the 2009 flexbox draft's names
WebKit and Gecko shipped the 2009 flexbox draft under display: -webkit-box
and -moz-box, with every property renamed (-webkit-box-align for
align-items, -webkit-box-pack for justify-content, and so on). BCD files
those as properties of their own that modern engines still read, so a
modern target kept every autoprefixed copy. They are now stated as the
legacy spellings of the properties that replaced them, with the keywords
the draft renamed: dropped beside the standard property where no target
needs them, and written for the targets that read only them. A block
with no standard twin, like a line clamp, keeps its own.
* fix(css): write the 2009 draft's box-flex and box-ordinal-group numbers
A target reading only the 2009 names got no copy of flex or order, since
those read a number where the standard property reads more. The copy now
takes the standard value's first component when it is a plain non-negative
number, plus one for box-ordinal-group (it counts from 1), with auto and none
as 1 and 0 for box-flex.
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
+
3
+
exports[`ConfigCacheTestCases css minimize-vendor-prefixes-flexbox-2009 minimize-vendor-prefixes-flexbox-2009 should compile 1`] =`
4
+
Array [
5
+
"/*! a container, and the keywords the draft renamed */.t01{display:-webkit-box;display:-moz-box;display:flex;-webkit-box-align:start;-moz-box-align:start;align-items:flex-start;-webkit-box-pack:justify;-moz-box-pack:justify;justify-content:space-between}",
6
+
"/*! one direction is two properties there */.t02{display:-webkit-inline-box;display:-moz-inline-box;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:reverse;-moz-box-orient:vertical;-moz-box-direction:reverse;flex-direction:column-reverse}",
7
+
"/*! \`box-flex\` reads the grow factor, and \`box-ordinal-group\` counts from 1 */.t03{-webkit-box-flex:1;-moz-box-flex:1;flex:1;-webkit-box-ordinal-group:3;-moz-box-ordinal-group:3;order:2}.t05{-webkit-box-flex:2;-moz-box-flex:2;flex:2;-webkit-box-ordinal-group:1;-moz-box-ordinal-group:1;order:0}.t06{-webkit-box-flex:1;-moz-box-flex:1;flex:auto}.t07{-webkit-box-flex:0;-moz-box-flex:0;flex:none}",
8
+
"/*! neither reads a number it cannot be given: a negative group, a basis alone */.t08{flex:10px;order:-1}",
9
+
"/*! a value the draft cannot read gets no copy at all */.t04{justify-content:space-evenly}",
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
+
3
+
exports[`ConfigTestCases css minimize-vendor-prefixes-flexbox-2009 minimize-vendor-prefixes-flexbox-2009 should compile 1`] =`
4
+
Array [
5
+
"/*! a container, and the keywords the draft renamed */.t01{display:-webkit-box;display:-moz-box;display:flex;-webkit-box-align:start;-moz-box-align:start;align-items:flex-start;-webkit-box-pack:justify;-moz-box-pack:justify;justify-content:space-between}",
6
+
"/*! one direction is two properties there */.t02{display:-webkit-inline-box;display:-moz-inline-box;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:reverse;-moz-box-orient:vertical;-moz-box-direction:reverse;flex-direction:column-reverse}",
7
+
"/*! \`box-flex\` reads the grow factor, and \`box-ordinal-group\` counts from 1 */.t03{-webkit-box-flex:1;-moz-box-flex:1;flex:1;-webkit-box-ordinal-group:3;-moz-box-ordinal-group:3;order:2}.t05{-webkit-box-flex:2;-moz-box-flex:2;flex:2;-webkit-box-ordinal-group:1;-moz-box-ordinal-group:1;order:0}.t06{-webkit-box-flex:1;-moz-box-flex:1;flex:auto}.t07{-webkit-box-flex:0;-moz-box-flex:0;flex:none}",
8
+
"/*! neither reads a number it cannot be given: a negative group, a basis alone */.t08{flex:10px;order:-1}",
9
+
"/*! a value the draft cannot read gets no copy at all */.t04{justify-content:space-evenly}",
0 commit comments