@@ -1385,8 +1385,45 @@ Images: the <<image>> type</h3>
13851385<h3 id="position">
138613862D Positioning: the <<position>> type</h3>
13871387
1388- The <<position>> data type is defined in [[!CSS3BG]] .
1389- UAs that support CSS Backgrounds & Borders Level 3 or its successor must interpret <<position>> as defined therein.
1388+ The <dfn><<position>></dfn> value specifies the position of a object area (e.g. background image)
1389+ inside a positioning area (e.g. background positioning area).
1390+ It is interpreted as specified for 'background-position' . [[!CSS3-BACKGROUNDS]]
1391+
1392+ <pre class=prod>
1393+ <<position>> = [
1394+ [ left | center | right ] || [ top | center | bottom ]
1395+ |
1396+ [ left | center | right | <<length-percentage>> ]
1397+ [ top | center | bottom | <<length-percentage>> ]?
1398+ |
1399+ [ [ left | right ] <<length-percentage>> ] &&
1400+ [ [ top | bottom ] <<length-percentage>> ]
1401+ ]
1402+ </pre>
1403+
1404+ Note: The 'background-position' property also accepts a three-value syntax.
1405+ This has been disallowed generically because it creates parsing ambiguities
1406+ when combined with other length or percentage components in a property value.
1407+
1408+ The canonical order when serializing is
1409+ the horizontal component followed by the vertical component.
1410+
1411+ When specified in a grammar alongside other keywords, <<length>> s, or <<percentage>> s,
1412+ <<position>> is <em> greedily</em> parsed;
1413+ it consumes as many components as possible.
1414+
1415+ <div class=example>
1416+ For example,
1417+ 'transform-origin' defines a 3D position
1418+ as (effectively) ''<<position>> <<length>>?'' .
1419+ A value such as ''left 50px''
1420+ will be parsed as a 2-value <<position>> ,
1421+ with an omitted z-component;
1422+ on the other hand,
1423+ a value such as ''top 50px''
1424+ will be parsed as a single-value <<position>>
1425+ followed by a <<length>> .
1426+ </div>
13901427
13911428<h2 id="functional-notations">
13921429Functional Notations</h2>
@@ -2040,12 +2077,13 @@ Acknowledgments</h2>
20402077<h2 class="no-num" id="changes">
20412078Changes</h2>
20422079
2043-
20442080 Changes since the <a href="https://www.w3.org/TR/2016/CR-css-values-3-20160929/">29 September 2016 Candidate Recommendation</a> are:
20452081
20462082 <ul>
2047- <li> Inlined definition of <<position>> and removed three-value syntax
2083+ <li> Inlined the <<position>> definition and dropped the three-value syntaxes
20482084 to allow for unambiguous combination in complex grammars.
2085+ This effectively removes that syntax from 'object-position' ,
2086+ but allows <<position>> to be re-used e.g. in [[CSS-TRANSFORMS]] for 3D positions.
20492087 (See <a href="https://lists.w3.org/Archives/Public/www-style/2017Feb/0052.html">discussion</a> .)
20502088 </ul>
20512089
0 commit comments