Skip to content

Commit 671e4a1

Browse files
committed
Added issue about simplifying flex-flow syntax. Editorial fixes.
1 parent 2a85dc1 commit 671e4a1

2 files changed

Lines changed: 51 additions & 12 deletions

File tree

css3-flexbox/Overview.html

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616

1717
<h1 id=head-box-flexible>CSS Flexible Box Layout Module</h1>
1818

19-
<h2 class="no-num no-toc" id=w3c-working>Editor's Draft, 3 September 2011</h2>
19+
<h2 class="no-num no-toc" id=w3c-working>Editor's Draft, 7 September 2011</h2>
2020

2121
<dl>
2222
<dt>This version:
2323

24-
<dd><!-- <a href="http://www.w3.org/TR/2011/WD-css3-flexbox-20110903/">http://www.w3.org/TR/2011/WD-css3-flexbox-20110903/</a></dd> -->
24+
<dd><!-- <a href="http://www.w3.org/TR/2011/WD-css3-flexbox-20110907/">http://www.w3.org/TR/2011/WD-css3-flexbox-20110907/</a></dd> -->
2525
<a
2626
href="http://dev.w3.org/csswg/css3-flexbox/">http://dev.w3.org/csswg/css3-flexbox/</a>
2727

@@ -252,8 +252,8 @@ <h2 id=box-model><span class=secno>2. </span> The Flexbox Box Model</h2>
252252
directly and which children are instead wrapped in anonymous boxes which
253253
are then <a href="#flexbox-item"><i>flexbox items</i></a>)</span>
254254

255-
<p>The flexbox layout algorithm works is agnostic as to the physical
256-
direction the flexbox happens to be laid out in, so we will define several
255+
<p>The flexbox layout algorithm is agnostic as to the physical direction
256+
the flexbox happens to be laid out in, so we will define several
257257
direction-agnostic terms here to make the rest of the spec easier to read
258258
and understand. The <dfn id=main-axis>main axis</dfn> of a flexbox is the
259259
axis on which <a href="#flexbox-item"><i>flexbox items</i></a> are laid
@@ -490,11 +490,11 @@ <h3 id=flex-items><span class=secno>2.2. </span> Flexbox Items</h3>
490490
<p>First, find the element's <dfn id=hypothetical-neighbors>hypothetical
491491
neighbors</dfn> by assuming that the element is a normal <a
492492
href="#flexbox-item"><i>flexbox item</i></a> with &lsquo;<code
493-
class=css>flex-order:1</code>&rsquo;, and reorder the flexbox's contents
493+
class=css>flex-order:0</code>&rsquo;, and reorder the flexbox's contents
494494
as mandated by &lsquo;<a href="#flex-order0"><code
495495
class=property>flex-order</code></a>&rsquo;. The <a
496496
href="#flexbox-item"><i>flexbox items</i></a> immediately preceding and
497-
following (in the flexbox's direction) the element (if any) are the
497+
following the element in the flexbox's direction (if any) are the
498498
element's <a href="#hypothetical-neighbors"><i>hypothetical
499499
neighbors</i></a>.
500500

@@ -727,15 +727,16 @@ <h3 id=flex-flow><span class=secno>3.1. </span> Flexbox Flow Direction: the
727727
aligned by the &lsquo;<a href="#flex-line-pack0"><code
728728
class=property>flex-line-pack</code></a>&rsquo; property.
729729

730-
<p>If the second keyword is omitted, the flexbox is single-line, the <a
730+
<p>If the second keyword is omitted, the flexbox is <a
731+
href="#single-line"><i>single-line</i></a>, the <a
731732
href="#cross-start"><i>cross-start</i></a> direction is equivalent to
732733
either the "start" or "before" direction of the current writing mode,
733734
whichever is in the <i>cross-axis</i>, and the <a
734735
href="#cross-end"><i>cross-end</i></a> direction is the opposite direction
735736
of <a href="#cross-start"><i>cross-start</i></a>.
736737

737738
<p>If the second keyword is provided, the flexbox is <a
738-
href="#multiline">multi-line</a>. The <a
739+
href="#multi-line"><i>multi-line</i></a>. The <a
739740
href="#cross-start"><i>cross-start</i></a> and <a
740741
href="#cross-end"><i>cross-end</i></a> directions are set as follows:
741742

@@ -795,6 +796,26 @@ <h3 id=flex-flow><span class=secno>3.1. </span> Flexbox Flow Direction: the
795796
flex-flow:vertical wrap-reverse } /* cross axis is left-to-right (opposite to block direction) */</pre>
796797
</div>
797798

799+
<div class=issue>
800+
<p>Are all these values necessary? I suspect we could get away with just:</p>
801+
802+
<pre>
803+
[ row | row-reverse | column | column-reverse ]
804+
[ wrap | wrap-reverse ]?
805+
|
806+
to [ top | bottom ]
807+
[ wrap-right | wrap-left ]?
808+
|
809+
to [ right | left ]
810+
[ wrap-up | wrap-down ]?</pre>
811+
812+
<p>In other words, just provide a pure-logical or pure-physical variant,
813+
rather than mixing physical and logical like with "horizontal wrap".</p>
814+
</div>
815+
816+
<p class=issue>Is there a good, shorter way to refer to the reversed
817+
physical directions than the 8-character "-reverse" suffix?
818+
798819
<h3 id=flex-order><span class=secno>3.2. </span> Display Order: the
799820
&lsquo;<a href="#flex-order0"><code
800821
class=property>flex-order</code></a>&rsquo; property</h3>

css3-flexbox/Overview.src.html

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ <h2 id='box-model'>
6565

6666
<p>An element with ''display:flexbox'' or ''display:inline-flexbox'' is a <dfn>flexbox</dfn>. Block-level children of a flexbox, and some other types of children, are called <dfn title="flexbox item|flexbox items|flexbox item's" id="flexbox-item">flexbox items</dfn> and are laid out using the flexbox box model. <span class='note'>(See the <a href="#flex-items">Flexbox Items</a> chapter, below, for specifics on which children are <i>flexbox items</i> directly and which children are instead wrapped in anonymous boxes which are then <i>flexbox items</i>)</span></p>
6767

68-
<p>The flexbox layout algorithm works is agnostic as to the physical direction the flexbox happens to be laid out in, so we will define several direction-agnostic terms here to make the rest of the spec easier to read and understand. The <dfn>main axis</dfn> of a flexbox is the axis on which <i>flexbox items</i> are laid out along. The <i>flexbox items</i> are ordered such that they start on the <dfn>main-start</dfn> side of the flexbox, and go toward the <dfn>main-end</dfn> side. A <i>flexbox item's</i> width or height, whichever is in the <i>main axis</i>, is the item's <dfn>main size</dfn>. The <i>flexbox item's</i> 'width' or 'height' property, specifically, that is in the <i>main axis</i> is the item's <dfn>main size property</dfn>. These terms are mapped to physical directions based on the first keyword in the 'flex-flow' property.</p>
68+
<p>The flexbox layout algorithm is agnostic as to the physical direction the flexbox happens to be laid out in, so we will define several direction-agnostic terms here to make the rest of the spec easier to read and understand. The <dfn>main axis</dfn> of a flexbox is the axis on which <i>flexbox items</i> are laid out along. The <i>flexbox items</i> are ordered such that they start on the <dfn>main-start</dfn> side of the flexbox, and go toward the <dfn>main-end</dfn> side. A <i>flexbox item's</i> width or height, whichever is in the <i>main axis</i>, is the item's <dfn>main size</dfn>. The <i>flexbox item's</i> 'width' or 'height' property, specifically, that is in the <i>main axis</i> is the item's <dfn>main size property</dfn>. These terms are mapped to physical directions based on the first keyword in the 'flex-flow' property.</p>
6969

7070
<p>The axis perpendicular to the <i>main axis</i> is called the <dfn>cross axis</dfn>, and similarly has <dfn>cross-start</dfn> and <dfn>cross-end</dfn> directions and sides defined. The width or height of a <i>flexbox item</i>, whichever is in the <i>cross axis</i>, is the item's <dfn>cross size</dfn>, and similarly the actual 'width' or 'height' property, whichever is in the <i>cross axis</i>, is the item's <dfn>cross size property</dfn>. These terms are mapped to physical directions based on the orientation of the <i>main axis</i> and the second keyword in the 'flex-flow' property.</p>
7171

@@ -189,7 +189,7 @@ <h3 id='flex-items'>
189189

190190
<p>Absolutely positioned children of a flexbox are not <i>flexbox items</i>, but their "static position" (their position when the 'top'/'right'/'bottom'/'left' properties are ''auto'') responds somewhat to the flexbox's various properties. The element's static position in the flexbox's <i>cross axis</i> is on the <i>cross-start</i> edge of the flexbox's content box. The static position in the flexbox's <i>main axis</i> is slightly more complex to compute:</p>
191191

192-
<p>First, find the element's <dfn>hypothetical neighbors</dfn> by assuming that the element is a normal <i>flexbox item</i> with ''flex-order:1'', and reorder the flexbox's contents as mandated by 'flex-order'. The <i>flexbox items</i> immediately preceding and following (in the flexbox's direction) the element (if any) are the element's <i>hypothetical neighbors</i>.</p>
192+
<p>First, find the element's <dfn>hypothetical neighbors</dfn> by assuming that the element is a normal <i>flexbox item</i> with ''flex-order:0'', and reorder the flexbox's contents as mandated by 'flex-order'. The <i>flexbox items</i> immediately preceding and following the element in the flexbox's direction (if any) are the element's <i>hypothetical neighbors</i>.</p>
193193

194194
<p>If the element has two neighbors, its static position in the <i>main axis</i> is exactly in the center of the packing space between them when the flexbox is actually laid out. If the element has only a preceding neighbor, its static position in the <i>main axis</i> is flush with the <i>main-end</i> edge of the margin box of the neighbor. If the element has only a following neighbor, its static position in the <i>main axis</i> is flush with the <i>main-start</i> edge of the margin box of the neighbor. Finally, if the element has no neighbors (the flexbox has no in-flow children at all), the static position in the <i>main axis</i> is based on the value of 'flex-pack': if the value is ''start'' or ''distribute'', it's flush with the <i>main-start</i> edge of the flexbox's content box; if the value is ''end'', it's flush with the <i>main-end</i> edge of the flexbox's content box; if the value is ''center'', it's centered within the flexbox's content box.</p>
195195

@@ -295,9 +295,9 @@ <h3 id='flex-flow'>
295295

296296
<p>The <i>cross axis</i> is always perpendicular to the <i>main axis</i>. The second keyword, or the lack of it, sets the cross directions (<i>cross-start</i> and <i>cross-end</i>), and dictates whether the flexbox is single-line or multi-line. The cross directions affect how individual <i>flexbox items</i> respond to the 'flex-align' property, and the direction in which multiple lines are stacked and aligned by the 'flex-line-pack' property.</p>
297297

298-
<p>If the second keyword is omitted, the flexbox is single-line, the <i>cross-start</i> direction is equivalent to either the "start" or "before" direction of the current writing mode, whichever is in the <i>cross-axis</i>, and the <i>cross-end</i> direction is the opposite direction of <i>cross-start</i>.</p>
298+
<p>If the second keyword is omitted, the flexbox is <i>single-line</i>, the <i>cross-start</i> direction is equivalent to either the "start" or "before" direction of the current writing mode, whichever is in the <i>cross-axis</i>, and the <i>cross-end</i> direction is the opposite direction of <i>cross-start</i>.</p>
299299

300-
<p>If the second keyword is provided, the flexbox is <a href="#multiline">multi-line</a>. The <i>cross-start</i> and <i>cross-end</i> directions are set as follows:</p>
300+
<p>If the second keyword is provided, the flexbox is <i>multi-line</i>. The <i>cross-start</i> and <i>cross-end</i> directions are set as follows:</p>
301301

302302
<dl>
303303
<dt><dfn id='flex-flow-wrap'>wrap</dfn></dt>
@@ -333,6 +333,24 @@ <h3 id='flex-flow'>
333333
flex-flow:vertical wrap-reverse } /* cross axis is left-to-right (opposite to block direction) */</pre>
334334
</div>
335335

336+
<div class='issue'>
337+
<p>Are all these values necessary? I suspect we could get away with just:</p>
338+
339+
<pre>
340+
[ row | row-reverse | column | column-reverse ]
341+
[ wrap | wrap-reverse ]?
342+
|
343+
to [ top | bottom ]
344+
[ wrap-right | wrap-left ]?
345+
|
346+
to [ right | left ]
347+
[ wrap-up | wrap-down ]?</pre>
348+
349+
<p>In other words, just provide a pure-logical or pure-physical variant, rather than mixing physical and logical like with "horizontal wrap".</p>
350+
</div>
351+
352+
<p class='issue'>Is there a good, shorter way to refer to the reversed physical directions than the 8-character "-reverse" suffix?</p>
353+
336354

337355
<h3 id='flex-order'>
338356
Display Order: the 'flex-order' property</h3>

0 commit comments

Comments
 (0)