@@ -922,100 +922,108 @@ The width of absolute or fixed positioned, replaced elements</h3>
922922<!-- End section: The width of absolute or fixed positioned, replaced element -->
923923
924924<h3 id="abs-non-replaced-height">
925- The height of absolute or fixed positioned, non-replaced elements </h3>
925+ The Height Of Absolutely Positioned, Non-Replaced Elements </h3>
926926
927- For absolutely positioned elements, the used values of the vertical dimensions must
928- satisfy this constraint:
927+ For absolutely positioned elements,
928+ the used values of the vertical dimensions
929+ must satisfy this constraint:
929930
930931 <code>
931932 'top' + <span> 'margin-top' </span> + <span> 'border-top-width' </span> + <span> 'padding-top' </span> + 'height' +
932933 <span> 'padding-bottom' </span> + <span> 'border-bottom-width' </span> + <span> 'margin-bottom' </span> + 'bottom'
933934 = <span> height of containing block</span>
934935 </code>
935936
936- If all three of 'top' , 'height' , and 'bottom' are <css> auto</css> : First set any <css> auto</css>
937- values for 'margin-top' and 'margin-bottom' to ''0'' , then set 'top' to the static
938- position, and finally apply rule number <em> three</em> below.
939-
940- If none of the three are <css> auto</css> : If both 'margin-top' and 'margin-bottom' are <css> auto</css> ,
941- solve the equation under the extra constraint that the two margins get equal values. If
942- one of 'margin-top' or 'margin-bottom' is <css> auto</css> , solve the equation for that value. If
943- the values are over-constrained, ignore the value for 'bottom' and solve for that value.
944-
945- Otherwise, set <css> auto</css> values for 'margin-top' and 'margin-bottom' to ''0'' , and pick
946- one of the following six rules that apply.
947-
948- <ol>
949- <li>
950- If 'top' and 'height' are <css> auto</css> and 'bottom' is not <css> auto</css> , then the height is
951- based on the <a href="#root-height">Auto heights for block formatting context
952- roots</a> , and solve for 'top' .
953-
954- <li>
955- If 'top' and 'bottom' are <css> auto</css> and 'height' is not <css> auto</css> , then set 'top' to
956- the static position, then solve for 'bottom' .
957-
958- <li>
959- If 'height' and 'bottom' are <css> auto</css> and 'top' is not <css> auto</css> , then the height is
960- based on the <a href="#root-height">Auto heights for block formatting context
961- roots</a> , and solve for 'bottom' .
962-
963- <li>
964- If 'top' is <css> auto</css> , 'height' and 'bottom' are not <css> auto</css> , then solve for 'top' .
965-
966- <li>
967- If 'height' is <css> auto</css> , 'top' and 'bottom' are not <css> auto</css> , then solve for 'height' .
968-
969- <li>
970- If 'bottom' is <css> auto</css> , 'top' and 'height' are not <css> auto</css> , then solve for 'bottom' .
971- </ol>
972- <!-- End section: The height of absolute or fixed positioned, non-replaced element -->
937+ If all three of 'top' , 'height' , and 'bottom' are ''top/auto'' :
938+ First set any ''top/auto'' values for 'margin-top' and 'margin-bottom' to ''0'' ,
939+ then set 'top' to the static position,
940+ and finally apply rule number <em> three</em> below.
941+
942+ If none of the three are ''top/auto'' :
943+ If both 'margin-top' and 'margin-bottom' are ''top/auto'' ,
944+ solve the equation under the extra constraint that the two margins get equal values.
945+ If one of 'margin-top' or 'margin-bottom' is ''top/auto'' ,
946+ solve the equation for that value.
947+ If the values are over-constrained,
948+ ignore the value for 'bottom' and solve for that value.
949+
950+ Otherwise,
951+ set ''top/auto'' values for 'margin-top' and 'margin-bottom' to ''0'' ,
952+ and pick one of the following six rules that apply.
953+
954+ 1. If 'top' and 'height' are ''top/auto''
955+ and 'bottom' is not ''top/auto'' ,
956+ then the height is based on the
957+ <a href="#root-height">Auto heights for block formatting context roots</a> ,
958+ and solve for 'top' .
959+
960+ 2. If 'top' and 'bottom' are ''top/auto''
961+ and 'height' is not ''top/auto'' ,
962+ then set 'top' to the static position,
963+ then solve for 'bottom' .
964+
965+ 3. If 'height' and 'bottom' are ''top/auto''
966+ and 'top' is not ''top/auto'' ,
967+ then the height is based on the
968+ <a href="#root-height">Auto heights for block formatting context roots</a> ,
969+ and solve for 'bottom' .
970+
971+ 4. If 'top' is ''top/auto'' ,
972+ 'height' and 'bottom' are not ''top/auto'' ,
973+ then solve for 'top' .
974+
975+ 5. If 'height' is ''top/auto'' ,
976+ 'top' and 'bottom' are not ''top/auto'' ,
977+ then solve for 'height' .
978+
979+ 6. If 'bottom' is ''top/auto'' ,
980+ 'top' and 'height' are not ''top/auto'' ,
981+ then solve for 'bottom' .
973982
974983<h3 id="abs-replaced-height">
975- The height of absolute or fixed positioned, replaced elements </h3>
984+ The Height Of Absolutely Positioned, Replaced Elements </h3>
976985
977- If 'height' and 'width' both have computed values of <css> auto</css> and the element also has an
978- intrinsic height, then that intrinsic height is the used value of 'height' .
986+ If 'height' and 'width' both have computed values of ''top/auto''
987+ and the element also has an intrinsic height,
988+ then that intrinsic height is the used value of 'height' .
979989
980- Otherwise, if 'height' has a computed value of <css> auto</css> and the element has an intrinsic
981- ratio then the used value of 'height' is:
990+ Otherwise, if 'height' has a computed value of ''top/auto''
991+ and the element has an intrinsic ratio
992+ then the used value of 'height' is:
982993
983994 <code> (used width) / (intrinsic ratio)</code></p>
984995
985- Otherwise, if 'height' has a computed value of <css> auto</css> and the element has an intrinsic
986- height, then that intrinsic height is the used value of 'height' .
996+ Otherwise, if 'height' has a computed value of ''top/auto''
997+ and the element has an intrinsic height,
998+ then that intrinsic height is the used value of 'height' .
987999
988- Otherwise, if 'height' has a computed value of <css> auto</css> , but none of the conditions above
989- are met, then the used value of 'height' must be set to the height of the largest
990- rectangle that has a 2:1 ratio, has a height not greater than ''150px'' , and has a width not
991- greater than the device width.
1000+ Otherwise, if 'height' has a computed value of ''top/auto'' ,
1001+ but none of the conditions above are met,
1002+ then the used value of 'height' must be set to
1003+ the height of the largest rectangle that has a 2:1 ratio,
1004+ has a height not greater than ''150px'' ,
1005+ and has a width not greater than the device width.
9921006
993- After establishing the 'height' , in order to position the replaced element, apply the
994- following rules as appropriate.
1007+ After establishing the 'height' ,
1008+ in order to position the replaced element,
1009+ apply the following rules as appropriate.
9951010
996- <ol>
997- <li>
998- If both 'top' and 'bottom' have the value <css> auto</css> , replace 'top' with the
999- element’s static position.
1011+ 1. If both 'top' and 'bottom' have the value ''top/auto'' ,
1012+ replace 'top' with the element’s static position.
10001013
1001- <li>
1002- If 'bottom' is <css> auto </css> , replace any <css> auto </css> on 'margin-top' or 'margin-bottom'
1014+ 2. If 'bottom' is ''top/auto'' ,
1015+ replace any ''top/auto'' on 'margin-top' or 'margin-bottom'
10031016 with ''0'' .
10041017
1005- <li>
1006- If at this point both 'margin-top' and 'margin-bottom' are still <css> auto</css> ,
1007- solve the equation under the extra constraint that the two margins must get
1008- equal values.
1018+ 3. If at this point both 'margin-top' and 'margin-bottom' are still ''top/auto'' ,
1019+ solve the equation under the extra constraint
1020+ that the two margins must get equal values.
10091021
1010- <li>
1011- If at this point there is only one <css> auto</css> remaining, solve the equation
1012- for that value.
1022+ 4. If at this point there is only one ''top/auto'' remaining,
1023+ solve the equation for that value.
10131024
1014- <li>
1015- If at this point the values are over-constrained, ignore the value for 'bottom'
1016- and solve for that value.
1017- </ol>
1018- <!-- End section: The height of absolute or fixed positioned, replaced element -->
1025+ 5. If at this point the values are over-constrained,
1026+ ignore the value for 'bottom' and solve for that value.
10191027
10201028<h3 id="root-height">
10211029Auto heights for block formatting context roots</h3>
0 commit comments