w3c / w3c/csswg-drafts

[css-align-3][css-flexbox-1] How to determine the last baseline of a flex container with different alignment groups.

Open
#7,641 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Closed Accepted by CSSWG Resolution css-align-3 css-flexbox-1 Needs Testcase (WPT)
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

See: https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=10608

<!DOCTYPE html>
<div style="display: inline-flex; align-items: last baseline;">
  <div style="background: lime; font-size: 30px;">line1<br>line2</div>
  <div style="display: flex;">
    <div style="font-size: 30px; align-self: last baseline; background: cyan;">line1<br>line2<br>line3</div> 
    <div style="font-size: 80px; align-self: baseline; background: hotpink;">line1<br>line2</div> 
  </div>
</div>

https://drafts.csswg.org/css-flexbox-1/#flex-baselines

Should the last baseline of the "lime" box be aligned with the last-baseline of the "cyan" box, or the "hotpink" box?

The rules just look at if something "participates in baseline alignment" so by that rule it should be the "hotpink" box.
But likely should be the "cyan" box.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CSS Flexbox 1 flex-baselines section and the linked live DOM viewer example, then read the related CSS Align 3 baseline-alignment rules. Determine which nested flex item establishes the outer last baseline and document the resolved normative behavior in the relevant specification text.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
frontend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.