Skip to content

Commit 9438827

Browse files
committed
Spec the baseline of a flexbox.
1 parent ed01fce commit 9438827

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

css3-flexbox/Overview.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,28 @@ <h2 id=display-flexbox><span class=secno>3. </span> New values for
500500
Additionally, each of the <a href="#flexbox-item"><i>flexbox items</i></a>
501501
establishes a new formatting context for its contents.
502502

503+
<p> The baseline of a flexbox is:
504+
505+
<ul>
506+
<li> If any of the <a href="#flexbox-item"><i>flexbox items</i></a> on the
507+
flexbox's first line have a computed value of &lsquo;<a
508+
href="#flex-align-baseline"><code class=css>baseline</code></a>&rsquo;
509+
for &lsquo;<a href="#flex-item-align"><code
510+
class=property>flex-item-align</code></a>&rsquo;, the flexbox's baseline
511+
is the baseline of those <a href="#flexbox-item"><i>flexbox
512+
items</i></a>.
513+
514+
<li> Otherwise, if the flexbox has at least one <a
515+
href="#flexbox-item"><i>flexbox item</i></a>, and its first <a
516+
href="#flexbox-item"><i>flexbox item</i></a>&lsquo;<code class=css>s
517+
baseline is parallel to the flexbox</code>&rsquo;s <a
518+
href="#main-axis"><i>main axis</i></a>, the flexbox's baseline is the
519+
baseline of its first <a href="#flexbox-item"><i>flexbox item</i></a>.
520+
521+
<li> Otherwise, the flexbox's baseline is the "after" edge of its content
522+
box.
523+
</ul>
524+
503525
<h2 id=flex-items><span class=secno>4. </span> Flexbox Items</h2>
504526

505527
<p>The flexbox layout algorithm operates on boxes generated by <dfn

css3-flexbox/Overview.src.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,24 @@ <h2 id='display-flexbox'>
170170

171171
<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> establishes a new formatting context for its contents.</p>
172172

173+
<p>
174+
The baseline of a flexbox is:
175+
176+
<ul>
177+
<li>
178+
If any of the <i>flexbox items</i> on the flexbox's first line
179+
have a computed value of ''baseline'' for 'flex-item-align',
180+
the flexbox's baseline is the baseline of those <i>flexbox items</i>.
181+
182+
<li>
183+
Otherwise, if the flexbox has at least one <i>flexbox item</i>,
184+
and its first <i>flexbox item</i>'s baseline is parallel to the flexbox's <i>main axis</i>,
185+
the flexbox's baseline is the baseline of its first <i>flexbox item</i>.
186+
187+
<li>
188+
Otherwise, the flexbox's baseline is the "after" edge of its content box.
189+
</ul>
190+
173191
<h2 id='flex-items'>
174192
Flexbox Items</h2>
175193

0 commit comments

Comments
 (0)