Csswg-drafts: [css-flexbox-1] Initial Value for flex-grow incorrect?

Created on 9 Oct 2020  路  4Comments  路  Source: w3c/csswg-drafts

Here you'll find a few paragraphs describing flex-grow and flex-shrink. It says for flex-grow:

When omitted, it is set to 1.

Is this a mistake? According to the property definition table the initial value is 0. So it seems this should be corrected to:

When omitted, it is set to 0.

Closed as Question Answered css-flexbox-1

Most helpful comment

Check the note at the end of that subsection, just before the 7.1.1 heading. ^_^

All 4 comments

Note: I had originally written that this was the case for both properties, but this seems to be a copy/paste mistake taken from flex-shrink.

No, it's correct. This one's a bit funky - the flex-grow component of the 'flex' longhand does not default to the initial value of the 'flex-grow' property.

@tabatkins Ah that's interesting. So, is there something you could add to that explains this a bit? Because it appears to be a contradiction. Or is it explained somewhere else?

Check the note at the end of that subsection, just before the 7.1.1 heading. ^_^

Was this page helpful?
0 / 5 - 0 ratings