W3C home > Mailing lists > Public > public-css-commits@w3.org > February 2012

csswg/css3-flexbox Overview.html,1.155,1.156 Overview.src.html,1.153,1.154

From: Alex Mogilevsky via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 16 Feb 2012 14:52:43 +0000
To: public-css-commits@w3.org
Message-Id: <E1Ry2hP-0000Mj-Mq@lionel-hutz.w3.org>
Update of /sources/public/csswg/css3-flexbox
In directory hutz:/tmp/cvs-serv1389

Modified Files:
	Overview.html Overview.src.html 
Log Message:
changed flex() function to 'flex' property
a few small editorial changes

Index: Overview.html
===================================================================
RCS file: /sources/public/csswg/css3-flexbox/Overview.html,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -d -r1.155 -r1.156
--- Overview.html	16 Feb 2012 12:18:40 -0000	1.155
+++ Overview.html	16 Feb 2012 14:52:41 -0000	1.156
@@ -214,7 +214,7 @@
     </ul>
 
    <li><a href="#flexibility"><span class=secno>4. </span> Flexibility: the
-    &lsquo;<code class=css>flex()</code>&rsquo; notation</a>
+    &lsquo;<code class=property>flex</code>&rsquo; property</a>
 
    <li><a href="#alignment"><span class=secno>5. </span> Alignment</a>
     <ul class=toc>
@@ -341,10 +341,7 @@
   <h3 id=placement><span class=secno>1.1. </span> Module interactions</h3>
 
   <p>This module extends the definition of the &lsquo;<code
-   class=property>display</code>&rsquo; property. It also defines a new type
-   of primitive value, the <a href="#flex-function">flex() notation</a>,
-   which is accepted by the &lsquo;<code class=property>width</code>&rsquo;
-   and &lsquo;<code class=property>height</code>&rsquo; properties.
+   class=property>display</code>&rsquo; property.
 
   <h3 id=values><span class=secno>1.2. </span> Values</h3>
 
@@ -418,19 +415,17 @@
   <p>The contents of a flexbox can be easily and powerfully manipulated with
    a handful of properties. Most significantly, <a
    href="#flexbox-item"><i>flexbox items</i></a> can "flex" their <a
-   href="#main-size"><i>main size</i></a> by using the &lsquo;<code
-   class=css>flex()</code>&rsquo; function in the &lsquo;<code
-   class=property>width</code>&rsquo; or &lsquo;<code
-   class=property>height</code>&rsquo; property. This "flexing" allows the
-   items to get bigger or smaller based on the available space in the page.
-   If there is leftover space in the flexbox after all of the <a
-   href="#flexbox-item"><i>flexbox items</i></a> have finished flexing, the
-   items can be aligned, centered, or distributed with the &lsquo;<a
-   href="#flex-pack0"><code class=property>flex-pack</code></a>&rsquo;
-   property. <a href="#flexbox-item"><i>Flexbox items</i></a> can also be
-   completely rearranged within the flexbox with the &lsquo;<a
-   href="#flex-order0"><code class=property>flex-order</code></a>&rsquo;
-   property.
+   href="#main-size"><i>main size</i></a> by using the &lsquo;<a
+   href="#flex"><code class=property>flex</code></a>&rsquo; property. This
+   "flexing" allows the items to get bigger or smaller based on the available
+   space in the page. If there is leftover space in the flexbox after all of
+   the <a href="#flexbox-item"><i>flexbox items</i></a> have finished
+   flexing, the items can be aligned, centered, or distributed with the
+   &lsquo;<a href="#flex-pack0"><code
+   class=property>flex-pack</code></a>&rsquo; property. <a
+   href="#flexbox-item"><i>Flexbox items</i></a> can also be completely
+   rearranged within the flexbox with the &lsquo;<a href="#flex-order0"><code
+   class=property>flex-order</code></a>&rsquo; property.
 
   <p>In the <a href="#cross-axis"><i>cross axis</i></a>, <a
    href="#flexbox-item"><i>flexbox items</i></a> can either "flex" to fill
@@ -509,6 +504,13 @@
    Additionally, each of the <a href="#flexbox-item"><i>flexbox items</i></a>
    establish a new formatting context for its contents.
 
+  <p class=issue>Although the term "flexbox formatting context" is defined
+   here, it is not used anywhere else. BFC is the commonly used term for what
+   it means here. Perhaps this could say that flexbox formatting context *is*
+   a block formatting context, with different rules for how blocks are
+   formatted but same protection from external floats etc. Then the terms can
+   be used interchangeably, as they will be anyway...
+
   <h3 id=flex-items><span class=secno>2.2. </span> Flexbox Items</h3>
 
   <p class=issue>Add a &lsquo;<code
@@ -1001,10 +1003,6 @@
 .tabs > .current {
 	flex-order: -1; /* Lower than the default of 0 */
 }</pre>
-
-   <p>You can also see a <a href=flex-order-example.html>working example</a>
-    in some modern browsers (modern WebKit, Firefox, or any browser that
-    supports the Flexbox spec).</p>
   </div>
 
   <div class=example>
@@ -1040,7 +1038,7 @@
 
    <pre>
 #main { display: flexbox; }
-#main > article { width: flex(1); flex-order: 2; }
+#main > article { flex:1;         flex-order: 2; }
 #main > nav     { width: 200px;   flex-order: 1; }
 #main > aside   { width: 200px;   flex-order: 3; }</pre>
 
@@ -1063,73 +1061,128 @@
     intelligent wrapping left as an exercise for the reader.)</small></p>
   </div>
 
-  <h2 id=flexibility><span class=secno>4. </span> Flexibility: the
-   &lsquo;<code class=css>flex()</code>&rsquo; notation</h2>
+  <h2 id=flexibility><span class=secno>4. </span> Flexibility: the &lsquo;<a
+   href="#flex"><code class=property>flex</code></a>&rsquo; property</h2>
 
   <p>The defining aspect of flexbox layout is the ability to make the <a
    href="#flexbox-item"><i>flexbox items</i></a> "flex", altering their width
    or height to fill the available space. This is done by using a &lsquo;<a
-   href="#ltflex"><code class=css>&lt;flex></code></a>&rsquo; value in the
-   element's &lsquo;<code class=property>width</code>&rsquo; or &lsquo;<code
-   class=property>height</code>&rsquo; property. A flexbox distributes free
-   space to its items proportional to their positive flexibility, or shrinks
-   them to prevent overflow proportional to their negative flexibility.
+   href="#flex"><code class=property>flex</code></a>&rsquo; property. A
+   flexbox distributes free space to its items proportional to their positive
+   flexibility, or shrinks them to prevent overflow proportional to their
+   negative flexibility.
 
-  <p>The &lsquo;<code class=css>flex()</code>&rsquo; notation is used to
-   specify the parameters of a <dfn id=flexible-length
+  <table class=propdef>
+   <tbody>
+    <tr>
+     <th>Name:
+
+     <td><dfn id=flex>flex</dfn>
+
+    <tr>
+     <th><a href="http://dev.w3.org/csswg/css-module/#values">Value</a>:
+
+     <td>[[ &lt;pos-flex> &lt;neg-flex>? ]? &amp;&amp;
+      [&lt;preferred-size>]?] | none
+
+    <tr>
+     <th>Initial:
+
+     <td>none
+
+    <tr>
+     <th>Applies to:
+
+     <td>flexbox items
+
+    <tr>
+     <th>Inherited:
+
+     <td>no
+
+    <tr>
+     <th>Computed Value:
+
+     <td>specified value
+
+    <tr>
+     <th>Media:
+
+     <td>visual
+
+    <tr>
+     <th>Animatable:
+
+     <td>yes
+  </table>
+
+  <p class=note><b>Editorial note:</b> in a property, default preferred size
+   of zero is problematic. If flex property is not specified, &lsquo;<code
+   class=property>width</code>&rsquo; or &lsquo;<code
+   class=property>height</code>&rsquo; must be used, which corresponds to
+   preferred size of &lsquo;<code class=property>auto</code>&rsquo;. But if
+   flex is specified, we want default preferred size of 0px. The new keyword
+   &lsquo;<a href="#flex-flow-none"><code
+   class=property>none</code></a>&rsquo; is the way around it.
+
+  <p>The &lsquo;<a href="#flex"><code class=property>flex</code></a>&rsquo;
+   property specifiex the parameters of a <dfn id=flexible-length
    title="flexible length|flexible lengths|flexible length's">flexible
    length</dfn>: the <dfn id=positive-flexibility
    title="positive flexibility">positive</dfn> and <dfn
    id=negative-flexibility>negative flexibility</dfn>, and the <dfn
-   id=preferred-size>preferred size</dfn>. The syntax of the &lsquo;<code
-   class=css>flex()</code>&rsquo; notation is:
-
-  <pre class=prod><dfn
-   id=ltflex>&lt;flex></dfn> = flex( [ &lt;pos-flex> &lt;neg-flex>? ]? &amp;&amp; &lt;preferred-size>? )</pre>
+   id=preferred-size>preferred size</dfn>.
 
   <p><code>&lt;pos-flex></code> and <code>&lt;neg-flex></code> are
    non-negative <code>&lt;numbers>s</code>, while
-   <code>&lt;preferred-size></code> is any value (other than another
-   &lsquo;<a href="#ltflex"><code class=css>&lt;flex></code></a>&rsquo;) that
-   would be valid in the &lsquo;<code class=property>width</code>&rsquo; or
-   &lsquo;<code class=property>height</code>&rsquo; property in which the
-   notation is used. If the <code>&lt;preferred-size></code> is &lsquo;<code
+   <code>&lt;preferred-size></code> is any value that would be valid in the
+   &lsquo;<code class=property>width</code>&rsquo; or &lsquo;<code
+   class=property>height</code>&rsquo; property. If the
+   <code>&lt;preferred-size></code> is &lsquo;<code
    class=css>0</code>&rsquo;, it <strong>must</strong> be specified with a
    unit (like &lsquo;<code class=css>0px</code>&rsquo;) to avoid ambiguity;
    unitless zero will either be interpreted as as one of the flexibilities,
    or is a syntax error.
 
-  <p>The <code>&lt;pos-flex></code> component sets the length's <a
+  <p>The <code>&lt;pos-flex></code> component sets the <a
    href="#positive-flexibility"><i>positive flexibility</i></a>; if omitted,
    the <a href="#positive-flexibility"><i>positive flexibility</i></a>
    defaults to &lsquo;<code class=css>1</code>&rsquo;. The
-   <code>&lt;neg-flex></code> component sets the length's <a
+   <code>&lt;neg-flex></code> component sets the <a
    href="#negative-flexibility"><i>negative flexibility</i></a>; if omitted,
-   it defaults to &lsquo;<code class=css>0</code>&rsquo;. The
-   <code>&lt;preferred-size></code> component sets the length's <a
+   it defaults to &lsquo;<code class=css>0</code>&rsquo;.
+
+  <p>The <code>&lt;preferred-size></code> component sets the <a
    href="#preferred-size"><i>preferred size</i></a>; if omitted, it defaults
-   to &lsquo;<code class=css>0px</code>&rsquo;.
+   to &lsquo;<code class=css>0px</code>&rsquo;. If set to &lsquo;<code
+   class=property>auto</code>&rsquo;, the value of &lsquo;<code
+   class=property>width</code>&rsquo; or &lsquo;<code
+   class=property>height</code>&rsquo; (whichever is in parallel to main
+   axis) is used as preferred size.
 
-  <p>If the &lsquo;<code class=css>flex()</code>&rsquo; notation is specified
-   on an element that is not a <a href="#flexbox-item"><i>flexbox
-   item</i></a>, it computes to the <a href="#preferred-size"><i>preferred
-   size</i></a>. If the &lsquo;<code class=css>flex()</code>&rsquo; notation
-   is used on a <a href="#flexbox-item"><i>flexbox item's</i></a> <a
-   href="#cross-size-property"><i>cross size property</i></a>, it computes to
-   the <a href="#preferred-size"><i>preferred size</i></a>. Otherwise, it
-   computes to itself, and is resolved to a length at used-value time by the
-   flexbox layout algorithm.
+  <p>The keyword &lsquo;<a href="#flex-flow-none"><code
+   class=property>none</code></a>&rsquo; is equivalent to "0 0 auto".
 
-  <p>A &lsquo;<a href="#ltflex"><code class=css>&lt;flex></code></a>&rsquo;
-   value is transitionable, by transitioning the <a
+  <p class=note><b>Reviewers:</b> editors differ in preference for default
+   value of the preferred size. The current choice is default flexibility of
+   "1" and default preferred size of "0px". Earlier spec and two partial
+   implementations use defaults of "0" and "auto". These still have to be
+   defaults when &lsquo;<a href="#flex"><code
+   class=property>flex</code></a>&rsquo; property is not specified. <br>
+   The current defaults are chosen by consensus, but there has not been much
+   external input in support of either option. If you can share an opinion,
+   and/or use cases in support of either set of defaults, the editors would
+   appreciate it.
+
+  <p>A &lsquo;<code class=css>&lt;flex></code>&rsquo; value is
+   transitionable, by transitioning the <a
    href="#preferred-size"><i>preferred size</i></a>, <a
    href="#positive-flexibility"><i>positive flexibility</i></a>, and <a
    href="#negative-flexibility"><i>negative flexibility</i></a>
-   independently. &lsquo;<a href="#ltflex"><code
-   class=css>&lt;flex></code></a>&rsquo; can also transition to and from a
-   &lt;length>, by treating the length as if it were a flexible length with a
-   positive and negative flexibility of zero and a preferred size of the
-   length.
+   independently. &lsquo;<code class=css>&lt;flex></code>&rsquo; can also
+   transition to and from a &lt;length>, by treating the length as if it were
+   a flexible length with a positive and negative flexibility of zero and a
+   preferred size of the length.
 
   <p class=issue>Transitioning to/from a &lt;length> (or to/from a &lt;flex>
    with 0 flexibility) doesn't work well if it's the only flexible item in
@@ -1138,11 +1191,11 @@
    value that represents a percentage of the free space or something?
 
   <div class=example>
-   <p>The &lsquo;<code class=css>flex()</code>&rsquo; notation allows
-    elements to respond directly to the available space, in ways that are
-    difficult or impossible in normal CSS. One common example is a page with
-    one segment intended to stay on screen, and another section which may be
-    long but which shouldn't scroll the page, like a chat room:</p>
+   <p>Flexibility allows elements to respond directly to the available space,
+    in ways that are difficult or impossible in normal CSS. One common
+    example is a page with one segment intended to stay on screen, and
+    another section which may be long but which shouldn't scroll the page,
+    like a chat room:</p>
 
    <pre>
 &lt;!DOCTYPE html>
@@ -1162,12 +1215,18 @@
  &lt;/body>
  &lt;style>
  body { display:flexbox; flex-flow: column; }
- #messages { height: flex(1); }
+ #messages { flex:1; }
  &lt;/style></pre>
 
    <p class=issue>Illustrate this example.</p>
   </div>
 
+  <p class=issue>Currently there are no separate properties for pos-flex,
+   neg-flex or preferred size. If it doesn't change, there needs to be at
+   least CSS OM access to the separate values. Parsing space-separated list
+   is easier than functional notation, but figuring out the used value for
+   preferred size is still far from trivial.
+
   <h2 id=alignment><span class=secno>5. </span> Alignment</h2>
 
   <p>After a flexbox's contents have finished their flexing, they can be
@@ -1484,6 +1543,33 @@
      <a href="#cross-start"><i>cross-start</i></a> edge of the line.</p>
   </dl>
 
+  <div class=issue>
+   <p>Finalize and define what happens to auto margin.
+
+   <p>Proposals:
+
+   <ul>
+    <li>cross-axis margins (align):
+     <ol>
+      <li>&lsquo;<code class=property>auto</code>&rsquo; is zero
+
+      <li>auto margins applied before alignment, map directly to alignment
+       values (start/end/center)
+
+      <li>auto margins applied before alignment, do safe align (flex-align
+       does &lsquo;<code class=css>true center</code>&rsquo; etc.)
+     </ol>
+
+    <li>main-axis margins (pack):
+     <ol>
+      <li>&lsquo;<code class=property>auto</code>&rsquo; is zero
+
+      <li>if there is positive extra space after flexing (and before pack),
+       distribute it equally to auto margins.
+     </ol>
+   </ul>
+  </div>
+
   <div class=figure> <img height=377 src="images/flex-align.svg" width=508>
    <p class=caption>An illustration of the five &lsquo;<a
     href="#flex-align0"><code class=property>flex-align</code></a>&rsquo;
@@ -1566,7 +1652,7 @@
 	width: 300px;
 }
 button {
-	width: flex(80px 1);
+	flex:80px 1;
 }
 &lt;style>
 
@@ -1612,7 +1698,7 @@
 	width: 300px;
 }
 button {
-	width: flex(80px 1);
+	flex:80px 1;
 	max-width: 90px;
 }</pre>
 
@@ -2585,6 +2671,22 @@
      <td>flexbox | inline-flexbox
 
     <tr>
+     <th><a class=property href="#flex">flex</a>
+
+     <td>[[ &lt;pos-flex> &lt;neg-flex>? ]? &amp;&amp;
+      [&lt;preferred-size>]?] | none
+
+     <td>none
+
+     <td>flexbox items
+
+     <td>no
+
+     <td>specified value
+
+     <td>visual
+
+    <tr>
      <th><a class=property href="#flex-align0">flex-align</a>
 
      <td>start | end | center | baseline | stretch
@@ -2774,8 +2876,7 @@
    <li>fix min size violations, <a href="#fix-size-constraint-violations"
     title="fix min size violations"><strong>7.</strong></a>
 
-   <li>&lt;flex>, <a href="#ltflex" title="&lt;flex>"><strong>4.</strong></a>
-    
+   <li>flex, <a href="#flex" title=flex><strong>4.</strong></a>
 
    <li>flex-align, <a href="#flex-align0"
     title=flex-align><strong>5.2.</strong></a>

Index: Overview.src.html
===================================================================
RCS file: /sources/public/csswg/css3-flexbox/Overview.src.html,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -d -r1.153 -r1.154
--- Overview.src.html	16 Feb 2012 12:18:40 -0000	1.153
+++ Overview.src.html	16 Feb 2012 14:52:41 -0000	1.154
@@ -112,7 +112,7 @@
 <h3 id="placement">
 Module interactions</h3>
 
-	<p>This module extends the definition of the 'display' property.  It also defines a new type of primitive value, the <a href="#flex-function">flex() notation</a>, which is accepted by the 'width' and 'height' properties.
+	<p>This module extends the definition of the 'display' property.
 
 <h3 id="values">
 Values</h3>
@@ -137,7 +137,7 @@
 
 	<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 <dfn>cross size property</dfn> is whichever of 'width' or 'height' that is in the <i>cross axis</i>.</p>
 
-	<p>The contents of a flexbox can be easily and powerfully manipulated with a handful of properties.  Most significantly, <i>flexbox items</i> can "flex" their <i>main size</i> by using the ''flex()'' function in the 'width' or 'height' property.  This "flexing" allows the items to get bigger or smaller based on the available space in the page.  If there is leftover space in the flexbox after all of the <i>flexbox items</i> have finished flexing, the items can be aligned, centered, or distributed with the 'flex-pack' property.  <i>Flexbox items</i> can also be completely rearranged within the flexbox with the 'flex-order' property.</p>
+	<p>The contents of a flexbox can be easily and powerfully manipulated with a handful of properties.  Most significantly, <i>flexbox items</i> can "flex" their <i>main size</i> by using the 'flex' property.  This "flexing" allows the items to get bigger or smaller based on the available space in the page.  If there is leftover space in the flexbox after all of the <i>flexbox items</i> have finished flexing, the items can be aligned, centered, or distributed with the 'flex-pack' property.  <i>Flexbox items</i> can also be completely rearranged within the flexbox with the 'flex-order' property.</p>
 
 	<p>In the <i>cross axis</i>, <i>flexbox items</i> can either "flex" to fill the available space or be aligned within the space with the 'flex-align' property.  If a flexbox is <i>multi-line</i>, new lines are added in the <i>cross-end</i> direction, and can similarly be aligned, centered, or distributed within the flexbox with the 'flex-line-pack' property.</p>
 
@@ -171,7 +171,11 @@
 	<p>If an element's specified value for 'display' is ''inline-flexbox'' and the element is floated or absolutely positioned, the computed value of 'display' must be ''flexbox''.</p>
 
 	<p>A flexbox establishes a new <dfn>flexbox formatting context</dfn> for its contents.  This is similar to a block formatting context root: floats do not intrude into the flexbox, and the flexbox's margins do not collapse with the margins of its contents.  Additionally, each of the <i>flexbox items</i> establish a new formatting context for its contents.</p>
-
+	<p class="issue">Although the term "flexbox formatting context" is defined here, 
+	it is not used anywhere else. BFC is the commonly used term for what it means here. 
+	Perhaps this could say that flexbox formatting context *is* a block formatting context, 
+	with different rules for how blocks are formatted but same protection from external floats etc.
+	Then the terms can be used interchangeably, as they will be anyway...</p>
 
 <h3 id='flex-items'>
 Flexbox Items</h3>
@@ -459,7 +463,6 @@
 	flex-order: -1; /* Lower than the default of 0 */
 }</pre>
 
-		<p>You can also see a <a href="flex-order-example.html">working example</a> in some modern browsers (modern WebKit, Firefox, or any browser that supports the Flexbox spec).</p>
 	</div>
 
 	<div class='example'>
@@ -482,7 +485,7 @@
 
 		<pre>
 #main { display: flexbox; }
-#main > article { width: flex(1); flex-order: 2; }
+#main > article { flex:1;         flex-order: 2; }
 #main > nav     { width: 200px;   flex-order: 1; }
 #main > aside   { width: 200px;   flex-order: 3; }</pre>
 		
@@ -503,26 +506,84 @@
 
 
 <h2 id='flexibility'>
-Flexibility: the ''flex()'' notation</h2>
+Flexibility: the 'flex' property</h2>
 
-	<p>The defining aspect of flexbox layout is the ability to make the <i>flexbox items</i> "flex", altering their width or height to fill the available space.  This is done by using a ''&lt;flex>'' value in the element's 'width' or 'height' property.  A flexbox distributes free space to its items proportional to their positive flexibility, or shrinks them to prevent overflow proportional to their negative flexibility.</p>
+	<p>The defining aspect of flexbox layout is the ability to make the <i>flexbox items</i> "flex", 
+	altering their width or height to fill the available space.  
+	This is done by using a 'flex' property.  
+	A flexbox distributes free space to its items proportional to their positive flexibility, 
+	or shrinks them to prevent overflow proportional to their negative flexibility.</p>
 
-	<p>The ''flex()'' notation is used to specify the parameters of a <dfn title="flexible length|flexible lengths|flexible length's">flexible length</dfn>: the <dfn id="positive-flexibility" title="positive flexibility">positive</dfn> and <dfn>negative flexibility</dfn>, and the <dfn>preferred size</dfn>.  The syntax of the ''flex()'' notation is:</p>
+	<table class=propdef>
+		<tr>
+			<th>Name:
+			<td><dfn>flex</dfn>
+		<tr>
+			<th><a href="http://dev.w3.org/csswg/css-module/#values">Value</a>:
+			<td>[[ &lt;pos-flex> &lt;neg-flex>? ]? &amp;&amp; [&lt;preferred-size>]?] | none 
+		<tr>
+			<th>Initial:
+			<td>none
+		<tr>
+			<th>Applies to:
+			<td>flexbox items
+		<tr>
+			<th>Inherited:
+			<td>no
+		<tr>
+			<th>Computed Value:
+			<td>specified value
+		<tr>
+			<th>Media:
+			<td>visual
+		<tr>
+			<th>Animatable:
+			<td>yes
+	</table>
 
-	<pre class=prod><dfn>&lt;flex></dfn> = flex( [ &lt;pos-flex> &lt;neg-flex>? ]? &amp;&amp; &lt;preferred-size>? )</pre>
+	<p class="note"><b>Editorial note:</b> in a property, default preferred size of zero is problematic. If flex property is
+	not specified, 'width' or 'height' must be used, which corresponds to preferred size of 'auto'.
+	But if flex is specified, we want default preferred size of 0px.
+	The new keyword 'none' is the way around it.
 
-	<p><code>&lt;pos-flex></code> and <code>&lt;neg-flex></code> are non-negative <code>&lt;numbers>s</code>, while <code>&lt;preferred-size></code> is any value (other than another ''&lt;flex>'') that would be valid in the 'width' or 'height' property in which the notation is used.  If the <code>&lt;preferred-size></code> is ''0'', it <strong>must</strong> be specified with a unit (like ''0px'') to avoid ambiguity; unitless zero will either be interpreted as as one of the flexibilities, or is a syntax error.</p>
+	<p>The 'flex' property specifiex the parameters of a <dfn title="flexible length|flexible lengths|flexible length's">flexible length</dfn>: the <dfn id="positive-flexibility" title="positive flexibility">positive</dfn> and <dfn>negative flexibility</dfn>, and the <dfn>preferred size</dfn>.
 
-	<p>The <code>&lt;pos-flex></code> component sets the length's <i>positive flexibility</i>; if omitted, the <i>positive flexibility</i> defaults to ''1''.  The <code>&lt;neg-flex></code> component sets the length's <i>negative flexibility</i>; if omitted, it defaults to ''0''.  The <code>&lt;preferred-size></code> component sets the length's <i>preferred size</i>; if omitted, it defaults to ''0px''.</p>
+	<p><code>&lt;pos-flex></code> and <code>&lt;neg-flex></code> are non-negative <code>&lt;numbers>s</code>, 
+	while <code>&lt;preferred-size></code> is any value that would be valid in the 
+	'width' or 'height' property.  
+	If the <code>&lt;preferred-size></code> is ''0'', it <strong>must</strong> be specified with a unit 
+	(like ''0px'') to avoid ambiguity; unitless zero will either be interpreted as as one of the 
+	flexibilities, or is a syntax error.</p>
 
-	<p>If the ''flex()'' notation is specified on an element that is not a <i>flexbox item</i>, it computes to the <i>preferred size</i>.  If the ''flex()'' notation is used on a <i>flexbox item's</i> <i>cross size property</i>, it computes to the <i>preferred size</i>.  Otherwise, it computes to itself, and is resolved to a length at used-value time by the flexbox layout algorithm.</p>
+	<p>The <code>&lt;pos-flex></code> component sets the <i>positive flexibility</i>; 
+	if omitted, the <i>positive flexibility</i> defaults to ''1''.  
+	The <code>&lt;neg-flex></code> component sets the <i>negative flexibility</i>; 
+	if omitted, it defaults to ''0''.  </p>
+	
+	<p>The <code>&lt;preferred-size></code> component sets the <i>preferred size</i>; 
+	if omitted, it defaults to ''0px''. If set to 'auto', the value of 'width' or 'height' (whichever is
+	in parallel to main axis) is used as preferred size.
+	
+	<p>The keyword 'none' is equivalent to "0 0 auto".
+	</p>
 
+	<p class="note"><b>Reviewers:</b> editors differ in preference for default value of the preferred size.
+	The current choice is default flexibility of "1" and default preferred size of "0px".
+	Earlier spec and two partial implementations use defaults of "0" and "auto". 
+	These still have to be defaults when 'flex' property is not specified.
+	<br>
+	The current defaults are chosen by consensus, but there has not been much external input in
+	support of either option. If you can share an opinion, and/or use cases in support of either 
+	set of defaults, the editors would appreciate it.
+	</p>
+		
+	
 	<p>A ''&lt;flex>'' value is transitionable, by transitioning the <i>preferred size</i>, <i>positive flexibility</i>, and <i>negative flexibility</i> independently.  ''&lt;flex>'' can also transition to and from a &lt;length>, by treating the length as if it were a flexible length with a positive and negative flexibility of zero and a preferred size of the length.</p>
 
 	<p class='issue'>Transitioning to/from a &lt;length> (or to/from a &lt;flex> with 0 flexibility) doesn't work well if it's the only flexible item in the flexbox.  Rather than smoothly transitioning, it suddenly jumps in size when the flexibility becomes non-zero.  Can we fix this, perhaps with a value that represents a percentage of the free space or something?</p>
 
 	<div class='example'>
-		<p>The ''flex()'' notation allows elements to respond directly to the available space, in ways that are difficult or impossible in normal CSS.  One common example is a page with one segment intended to stay on screen, and another section which may be long but which shouldn't scroll the page, like a chat room:</p>
+		<p>Flexibility allows elements to respond directly to the available space, in ways that are difficult or impossible in normal CSS.  One common example is a page with one segment intended to stay on screen, and another section which may be long but which shouldn't scroll the page, like a chat room:</p>
 
 		<pre>
 &lt;!DOCTYPE html>
@@ -542,11 +603,15 @@
  &lt;/body>
  &lt;style>
  body { display:flexbox; flex-flow: column; }
- #messages { height: flex(1); }
+ #messages { flex:1; }
  &lt;/style></pre>
 
 		<p class='issue'>Illustrate this example.</p>
 	</div> 
+	
+<p class="issue">Currently there are no separate properties for pos-flex, neg-flex or preferred size. 
+If it doesn't change, there needs to be at least CSS OM access to the separate values. 
+Parsing space-separated list is easier than functional notation, but figuring out the used value for preferred size is still far from trivial.
 
 <h2 id='alignment'>
 Alignment</h2>
@@ -695,6 +760,25 @@
 		</dd>
 	</dl>
 
+	<div class="issue"><p>Finalize and define what happens to auto margin.
+		<p>Proposals: 
+			<ul>
+			<li>cross-axis margins (align):
+				<ol>
+				<li>'auto' is zero
+				<li>auto margins applied before alignment, map directly to alignment values (start/end/center)
+				<li>auto margins applied before alignment, do safe align (flex-align does 'true center' etc.)
+				</ol>
+			</li>
+			<li>main-axis margins (pack):
+				<ol>
+				<li>'auto' is zero
+				<li>if there is positive extra space after flexing (and before pack), distribute it equally to auto margins.
+				</ol>
+			</li>
+		</p>
+	</div>
+	
 	<div class='figure'>
 		<img src="images/flex-align.svg" width=508 height=377>
 		<p class='caption'>An illustration of the five 'flex-align' keywords and their effects on a flexbox with four colored items.</p>
@@ -741,7 +825,7 @@
 	width: 300px;
 }
 button {
-	width: flex(80px 1);
+	flex:80px 1;
 }
 &lt;style>
 
@@ -775,7 +859,7 @@
 	width: 300px;
 }
 button {
-	width: flex(80px 1);
+	flex:80px 1;
 	max-width: 90px;
 }</pre>
 
Received on Thursday, 16 February 2012 14:52:46 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:44:50 UTC