<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>21847</bug_id>
          
          <creation_ts>2013-04-26 10:51:19 +0000</creation_ts>
          <short_desc>The ‘flex’ Shorthand: Grow shorthand</short_desc>
          <delta_ts>2013-04-26 19:24:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSS</product>
          <component>Flexbox</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Craig Francis">craig</reporter>
          <assigned_to name="Tab Atkins Jr.">jackalmage</assigned_to>
          <cc>alexmog</cc>
    
    <cc>dbaron</cc>
          
          <qa_contact>public-css-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>86851</commentid>
    <comment_count>0</comment_count>
    <who name="Craig Francis">craig</who>
    <bug_when>2013-04-26 10:51:19 +0000</bug_when>
    <thetext>In section 7.1, The ‘flex’ Shorthand:

http://www.w3.org/TR/css3-flexbox/#flex-property

The flex-grow description ends with &quot;When omitted, it is set to ‘1’&quot;

However the default for flex-grow is 0:

http://www.w3.org/TR/css3-flexbox/#flex-grow

It seems like a copy/paste issue from flex-shrink which does have a default of 1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86872</commentid>
    <comment_count>1</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2013-04-26 14:52:13 +0000</bug_when>
    <thetext>Nope, that&apos;s the intended behavior.  The initial values are set up to give us the default behavior of &quot;0 1 auto&quot;, but they&apos;re not the best values for when you actually start using the shorthand.  So, we substitute missing values specially, rather than relying on the normal &quot;use the initial value&quot; behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86873</commentid>
    <comment_count>2</comment_count>
    <who name="Craig Francis">craig</who>
    <bug_when>2013-04-26 15:08:08 +0000</bug_when>
    <thetext>Odd, thats not how I&apos;ve used CSS shorthand properties before...

---

http://www.w3.org/TR/CSS21/fonts.html#propdef-font

Because the &apos;font&apos; shorthand property resets any property not explicitly given a value to its /initial/ value.

---

http://www.w3.org/TR/CSS21/box.html#propdef-border-left

Omitted values are set to their /initial/ values.

---

http://www.w3.org/TR/CSS21/colors.html#propdef-background

Given a valid declaration, the &apos;background&apos; property first sets all the individual background properties to their /initial/ values, then assigns explicit values given in the declaration.

---

Those are the first three that come to mind, and all use the initial value... so for consistency the flex shorthand should do as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86875</commentid>
    <comment_count>3</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2013-04-26 16:39:17 +0000</bug_when>
    <thetext>Yes, like I said, it&apos;s different from normal shorthand behavior, and intentional.  It&apos;s because there&apos;s a mismatch between what we want as the &quot;initial&quot; value, and what we want as the &quot;default&quot; values when omitted.  In most properties, the two concepts are the same.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86880</commentid>
    <comment_count>4</comment_count>
    <who name="Craig Francis">craig</who>
    <bug_when>2013-04-26 17:37:54 +0000</bug_when>
    <thetext>Not sure I like that, I was experimenting with the flexbox approach today and tried to use the spec to understand what was happening... I initially misread it as the &quot;grow&quot; property should have been set to 1 by default.

Will leave it as resolved, as I presume this has already been implemented in the browsers.

Maybe the document should say:

   When omitted, it is set to &apos;1&apos;, although the default is &apos;0&apos;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86884</commentid>
    <comment_count>5</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2013-04-26 19:24:51 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; Maybe the document should say:
&gt; 
&gt;    When omitted, it is set to &apos;1&apos;, although the default is &apos;0&apos;.

There is already a note to that effect at the end of section 7.1.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>