w3c / w3c/csswg-drafts

[css-flexbox-1] Flex container baselines with reverse direction.

Open
#7,776 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Closed Accepted by CSSWG Resolution Commenter Response Pending css-flexbox-1
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

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

<!DOCTYPE html>
baseline
<div style="border: solid 3px; display: inline-flex; flex-direction: row-reverse;">
  <div style="background: lime;">a</div>
  <div style="background: hotpink; font-size: 30px;">b</div>
</div>

Here all implementions pick up the "a" baseline (logically last), instead of the "b".

Similar for column flexboxes:
https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=10776

Following this logic for "last baseline" would mean the last baseline is at the top. (Note Firefox doesn't appear to support this case - unsure what its doing).

Are implementations correct?
I believe implementations are incorrect per-spec - from: https://drafts.csswg.org/css-flexbox-1/#flex-baselines
"To this end, the baselines of a flex container are determined as follows (after reordering with order, and taking flex-direction into account):"

But should be explicit. Note there are several WPTs asserting this behaviour.

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 two linked live DOM examples for row- and column-reverse flex containers. Review the existing WPTs mentioned in the issue and determine whether the specification’s treatment of flex-direction and last baselines is explicit and consistent with their assertions. Done means the expected behavior is resolved and stated unambiguously.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
documentation, web-dev
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.