Skip to content

[css-align-3][css-multicol-1] First baseline of a multicol #7856

Open
@bfgeek

Description

@bfgeek

From: #7639 (comment)

In reviewing the last-baseline behaviour for multi-col we discovered that the first-baseline behaviour of multicol is inconsistent.

For example:
https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=10862

<!DOCTYPE html>
<div style="display: flex; align-items: baseline; border: solid 5px;">
  <div style="background: lime;">baseline</div>
  <div style="columns: 2; background: cyan;">
    <div style="height: 50px;"></div>
    line1<br>line2<br>line3<br>line4<br>line5
  </div>
</div>

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

<!DOCTYPE html>
<div style="display: flex; align-items: baseline; border: solid 5px;">
  <div style="background: lime;">baseline</div>
  <div style="columns: 2; background: cyan;">
    <div style="height: 100px;"></div>
    line1<br>line2<br>line3<br>line4<br>line5
    <div style="height: 20px;"></div>
  </div>
</div>

Currently all engines take the first-baseline from the "first" column - if there isn't a baseline within that column we'll produce no baseline for the entire multicol.

Is this desired?

Two options which are better (IMO) than the status quo.

  1. As @mstensho suggests take the highest baseline from the entire multicol (including spanners for example). This makes it symmetrical with last-baseline (taking the lowest).
  2. Take the first-baseline from the first column/span with a baseline. With this approach for example number 2 the baseline will be the first-baseline of the 2nd column.

Ian

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions