Skip to content

Commit a9d24c6

Browse files
committed
[css-position-3] Refactor display/position/float computation section (deferring the floats rules to CSS2 until a css-floats spec exists, and taking advantage of the (relatively new) definition of blockification in css-display.
1 parent da4ee01 commit a9d24c6

File tree

1 file changed

+3
-61
lines changed

1 file changed

+3
-61
lines changed

css-position-3/Overview.bs

Lines changed: 3 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,9 @@ Choosing A Positioning Scheme: 'position' property</h2>
278278
</div>
279279
</dl>
280280

281+
A 'position' value of ''position/absolute'' or ''position/fixed''
282+
[=blockifies=] the box
283+
and causes 'float' to compute to ''float/none''.
281284

282285
<h3 id="def-cb">
283286
Containing Blocks of Positioned Boxes</h3>
@@ -1209,67 +1212,6 @@ Auto heights for block formatting context roots</h3>
12091212
<!-- End section: Auto heights for block formatting context roots -->
12101213
<!-- End section: Sizing and positioning details -->
12111214

1212-
<h2 id="dis-pos-flo">
1213-
Relationships between 'display', 'position', and 'float'</h2>
1214-
1215-
The three properties that affect box generation and layout &mdash; 'display',
1216-
'position', and 'float' &mdash; interact as follows:
1217-
1218-
<ol>
1219-
<li>
1220-
If 'display' has the value ''display/none'', then 'position' and 'float' do not apply.
1221-
In this case, the element generates no box.
1222-
1223-
<li>
1224-
Otherwise, if 'position' has the value ''absolute'' or ''fixed'',
1225-
and the value of 'float' is ''float/left'' or ''float/right'', the box is absolutely
1226-
positioned and the computed value of 'float' is ''float/none''. The 'display' is
1227-
set according to the table below. Positioning of the box will determined by
1228-
the 'top', 'right', 'bottom' and 'left' properties and the box’s
1229-
<a>containing block</a>.
1230-
1231-
<li>
1232-
Otherwise, if 'float' is other than ''float/none'', the box is <a>floated</a> and 'display' is set according to the table below.
1233-
1234-
<li>
1235-
Otherwise, if the element is the root element, 'display' is set according to the
1236-
table below.
1237-
1238-
<li>
1239-
Otherwise, the remaining 'display' property values apply as specified.
1240-
</ol>
1241-
1242-
<table class="relationship-table">
1243-
<tr>
1244-
<th>Specified value</th>
1245-
<th>Computed value</th>
1246-
</tr>
1247-
<tr>
1248-
<td>inline-table
1249-
<td>table
1250-
</tr>
1251-
<tr>
1252-
<td>
1253-
inline, <span>table-row-group</span>, <span>table-column</span>,
1254-
<span>table-column-group</span>,
1255-
<span>table-header-group</span>, <span>table-footer-group</span>,
1256-
<span>table-row</span>,
1257-
<span>table-cell</span>, <span>table-caption</span>, <span>inline-block</span>
1258-
1259-
<td>block
1260-
</tr>
1261-
<tr>
1262-
<td>others
1263-
<td><span>same as specified</span>
1264-
</tr>
1265-
</table>
1266-
1267-
<p class="note">
1268-
For new values defined for the 'display' property, the respective modules that define a
1269-
new value also define the handling of the relationship with positioning and floats.
1270-
</p>
1271-
<!-- End section: Relationships between 'display', 'position', and 'float' -->
1272-
12731215
<h2 id="comparison">
12741216
Comparison of normal flow, floats, and positioning</h2>
12751217

0 commit comments

Comments
 (0)