Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
fantasai opened this issue Jun 21, 2016 · 5 comments
Closed

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

fantasai opened this issue Jun 21, 2016 · 5 comments
Assignees
Labels
Closed Accepted by CSSWG Resolution Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-align-3 Current Work css-inline-3 Current Work

Comments

@fantasai
Copy link
Collaborator

fantasai commented Jun 21, 2016

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?
@fantasai
Copy link
Collaborator Author

Discussion on the WG call rejected 1 & 3, seem to have a slight preference for 4. We should probably investigate whether/how 'alignment-baseline' is applied to non-inlines, since that might make a difference here as well.

@tabatkins tabatkins removed the Agenda+ label Jun 29, 2016
@FremyCompany
Copy link
Contributor

Just said on today's call I had a preference for a "baseline-choice: first / last".

@FremyCompany
Copy link
Contributor

Fantasai pointed out we want an auto value to reflect tables choosing the first and inline-block the last by default.

@tabatkins
Copy link
Member

Resolution was to change the alignment properties to have [ first | last ]? baseline.

@fantasai
Copy link
Collaborator Author

Fix checked in 4f6d5ad

@fantasai fantasai added Closed Accepted by CSSWG Resolution Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. labels May 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted by CSSWG Resolution Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-align-3 Current Work css-inline-3 Current Work
Projects
None yet
Development

No branches or pull requests

3 participants