|
206 | 206 |
|
207 | 207 | <h1 id=head-box-flexible>CSS Flexible Box Layout Module</h1> |
208 | 208 |
|
209 | | - <h2 class="no-num no-toc" id=w3c-working>Editor's Draft, 24 July 2012</h2> |
| 209 | + <h2 class="no-num no-toc" id=w3c-working>Editor's Draft, 25 July 2012</h2> |
210 | 210 |
|
211 | 211 | <dl> |
212 | 212 | <dt>This version: |
213 | | - <!--<dd><a href="http://www.w3.org/TR/2012/ED-css3-flexbox-20120724/">http://www.w3.org/TR/2012/WD-css3-flexbox-20120724/</a>--> |
| 213 | + <!--<dd><a href="http://www.w3.org/TR/2012/ED-css3-flexbox-20120725/">http://www.w3.org/TR/2012/WD-css3-flexbox-20120725/</a>--> |
214 | 214 |
|
215 | 215 |
|
216 | 216 | <dd><a |
@@ -621,62 +621,52 @@ <h3 id=overview><span class=secno>1.1. </span> Overview</h3> |
621 | 621 | box, regardless of the height of the description. |
622 | 622 | </ul> |
623 | 623 |
|
624 | | - <div style="display:table;"> |
625 | | - <div style="display:table-cell;"> |
626 | | - <pre> |
| 624 | + <pre> |
627 | 625 | <style> |
628 | 626 | #deals { |
629 | | - display: flex; |
630 | | - flex-flow: row wrap; |
| 627 | + display: flex; /* Flex layout so items <a |
| 628 | + href="#align-self" |
| 629 | + title="Flex items stretch by default.">have equal height</a> */ |
| 630 | + flex-flow: row wrap; /* <a |
| 631 | + href="http://dev.w3.org/csswg/css3-flexbox/#flex-flow-property">Allow items to wrap into multiple lines</a> */ |
631 | 632 | } |
632 | 633 | .sale-item { |
633 | | - display: flex; |
634 | | - flex-flow: column; |
635 | | - padding: 1em; |
| 634 | + display: flex; /* Lay out each item using flex layout */ |
| 635 | + flex-flow: column; /* <a |
| 636 | + href="#flex-flow-property">Lay out item's contents vertically</a> */ |
636 | 637 | } |
637 | 638 | .sale-item > img { |
638 | | - order: -1; |
639 | | - align-self: center; |
| 639 | + order: -1; /* <a |
| 640 | + href="#order-property">Shift image before other content (in visual order)</a> */ |
| 641 | + align-self: center; /* <a |
| 642 | + href="#align-self">Center the image cross-wise (horizontally)</a> */ |
640 | 643 | } |
641 | 644 | .sale-item > button { |
642 | | - margin: auto 5% 0; |
| 645 | + margin-top: auto; /* <a |
| 646 | + href="#auto-margins">Auto top margin pushes button to bottom</a> */ |
643 | 647 | } |
644 | 648 | </style></pre> |
645 | | - </div> |
646 | 649 |
|
647 | | - <div style="display:table-cell;"> |
648 | | - <pre> |
| 650 | + <pre> |
649 | 651 | <section id='deals'> |
650 | 652 | <section class='sale-item'> |
651 | 653 | <h1>Computer Starter Kit</h1> |
652 | | - <p> |
653 | | - This is the best computer money can buy, |
654 | | - if you don't have much money. |
| 654 | + <p>This is the best computer money can buy, if you don't have much money. |
655 | 655 | <ul> |
656 | 656 | <li>Computer |
657 | 657 | <li>Monitor |
658 | 658 | <li>Keyboard |
659 | 659 | <li>Mouse |
660 | 660 | </ul> |
661 | | - <img src="images/computer.jpg" |
662 | | - alt='You get: a white computer with matching peripherals.'> |
| 661 | + <img src='images/computer.jpg' |
| 662 | + alt='You get: a white computer with matching peripherals.'> |
663 | 663 | <button>BUY NOW</button> |
664 | 664 | </section> |
665 | | - |
666 | 665 | <section class='sale-item'> |
667 | | - <h1>Printer</h1> |
668 | | - <p> |
669 | | - Only capable of printing |
670 | | - ASCII art. |
671 | | - <ul> |
672 | | - <li>Paper and ink not included. |
673 | | - </ul> |
674 | | - <img src="images/printer.jpg" alt='You get: beautiful ASCII art.'> |
675 | | - <button>BUY NOW</button> |
| 666 | + … |
676 | 667 | </section> |
| 668 | + … |
677 | 669 | </section></pre> |
678 | | - </div> |
679 | | - </div> |
680 | 670 | <figure> |
681 | 671 | <div id=overview-example> |
682 | 672 | <div class=col></div> |
|
0 commit comments