Skip to content

Commit 8e45db0

Browse files
committed
[css-position] Create a table from the abspos text for easier reference.
1 parent fb61c23 commit 8e45db0

2 files changed

Lines changed: 657 additions & 327 deletions

File tree

css-position/Overview.bs

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,6 +1421,98 @@ The width of absolute, page or fixed positioned, non-replaced elements</h3>
14211421
<li>
14221422
If 'right' is ''auto'', 'left' and 'width' are not ''auto'', then solve for 'right'.
14231423
</ol>
1424+
1425+
<table class=data id='abspos-auto'>
1426+
<style scoped>
1427+
#abspos-auto ul { list-style-type: none; }
1428+
</style>
1429+
<colgroup span=5></colgroup>
1430+
<colgroup span=1></colgroup>
1431+
<thead>
1432+
<tr>
1433+
<th colspan=5>Is auto?
1434+
<th rowspan=2>Result
1435+
<tr>
1436+
<th>'left'
1437+
<th>'width'
1438+
<th>'right'
1439+
<th>'margin-left'
1440+
<th>'margin-right'
1441+
<tbody>
1442+
<tr>
1443+
<td>
1444+
<td>
1445+
<td>
1446+
<td colspan=2>n/a
1447+
<td>
1448+
<ul>
1449+
<li>auto margins → zero
1450+
<li>left → static pos
1451+
<li>width → shrink-to-fit
1452+
<li>right → solve
1453+
</ul>
1454+
<tr>
1455+
<td rowspan=4>
1456+
<td rowspan=4>
1457+
<td rowspan=4>
1458+
<td>
1459+
<td>
1460+
<td rowspan=2>
1461+
auto margin → free space
1462+
<tr>
1463+
<td>
1464+
<td>
1465+
<tr>
1466+
<td>
1467+
<td>
1468+
<td>
1469+
<ul>
1470+
<li>margins split positive free space
1471+
<li>right margin gets negative free space
1472+
</ul>
1473+
<tr>
1474+
<td>
1475+
<td>
1476+
<td>
1477+
treat 'right' as ''right/auto''
1478+
<tr>
1479+
<td>
1480+
<td>
1481+
<td>
1482+
<td colspan=2>n/a
1483+
<td>
1484+
<ul>
1485+
<li>left → static pos
1486+
<li>right → solve
1487+
</ul>
1488+
<tr>
1489+
<td>
1490+
<td>
1491+
<td>
1492+
<td colspan=2>n/a
1493+
<td>
1494+
<ul>
1495+
<li>left → solve
1496+
<li>width → shrink-to-fit
1497+
<li>right → as specified
1498+
</ul>
1499+
<tr>
1500+
<td>
1501+
<td>
1502+
<td>
1503+
<td colspan=2>n/a
1504+
<td>
1505+
<ul>
1506+
<li>left → as specified
1507+
<li>width → shrink-to-fit
1508+
<li>right → solve
1509+
</ul>
1510+
<tr>
1511+
<td colspan=3>any one auto
1512+
<td colspan=2>n/a
1513+
<td>solve for auto
1514+
</table>
1515+
14241516
<!-- End section: The width of absolute, page or fixed positioned, non-replaced element -->
14251517

14261518
<h3 id="center-non-replaced-width">

0 commit comments

Comments
 (0)