Skip to content

[css-align][css-inline] Deal with first vs last baseline #210

@fantasai

Description

@fantasai

The CSS Box Alignment spec introduces the ability to choose the last baseline instead of the first for baseline-aligning boxes. This ability needs to also be ported to the vertical-align property (in CSS Inline Layout). Note, the vertical-align property is especially wonky because for inline-tables it uses the first baseline and for inline-blocks it uses the last.

The current syntax in Box Alignment is to contrast baseline (imported from Flexbox) with last-baseline (new in Box Alignment). However, using prefixed keywords would result in a combinatorial explosion if we added it to the alignment-baseline subproperty of vertical-align.

Some solutions to this problem:

  1. Explode alignment-baseline.
  2. Use last and baseline as separated keywords in align/justify-self/content as well as alignment-baseline.
  3. Use last-baseline in align/justify-self/content and last baseline in alignment-baseline.
  4. Introduce a new property to choose first vs last for vertical-align, and have last-baseline decompose to last in that property plus baseline for alignment-baseline.
  5. Introduce first-baseline and last-baseline to alignment-baseline(to match Align), but also allow first and last space-separated prefixes for all values of alignment-baseline(to avoid explosion). (This means that both first-baseline and first baseline would be valid, but eh?)
  6. Something else?

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions