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-inline] Which baseline to use as alignment baseline for grid container? #195

Closed
MatsPalmgren opened this issue Jun 16, 2016 · 5 comments

Comments

@MatsPalmgren
Copy link

The chapter on Grid Container Baselines needs to say which baseline
to use as the alignment baseline.
https://drafts.csswg.org/css-grid/#grid-baselines

I'm looking for a statement like what CSS2 says for inline-block and inline-table
at the very end of chap 10:
https://www.w3.org/TR/CSS22/visudet.html
"The baseline of an 'inline-table' is ..."

I can't seem to find anything like that for Grid (or Flexbox for that matter).

@fantasai
Copy link
Collaborator

I'm not sure I understand the question. If you are doing first-baseline alignment on a grid, then you use a baseline from the (defined) first baseline set. If you are doing last-baseline alignment on a grid, then you use a baseline from the last baseline set. Of the baselines in the set, which one you use is determined by the alignment context.

The text in https://www.w3.org/TR/css-align-3/#baseline-rules is intended to replace the text at the end of chapter 10 with prose that handles the fact that, in Level 3, we have multiple baselines per line of text.

It's quite possible that I'm missing something, but I'm not sure what. :)

@MatsPalmgren
Copy link
Author

Let's say I have an inline-grid with three rows next to some text "A"
on a block line. Should the grid be aligned on the line like so:

A 1
2
3

or like so:

1
2
A 3

Thanks,
Mats

@fantasai fantasai added css-align-3 Current Work css-inline-3 Current Work Agenda+ labels Jun 20, 2016
@fantasai fantasai changed the title [css-grid] Which baseline to use as alignment baseline for grid container? [css-grid][css-align][css-inline] Which baseline to use as alignment baseline for grid container? Jun 20, 2016
@fantasai
Copy link
Collaborator

Ah, you're asking for 'vertical-align: baseline', do we use 'first-baseline' or 'last-baseline'... since CSS2.1 is totally inconsistent and picks first-baseline for inline-table and last-baseline for inline-block. I'd say first-baseline, since that's how the 'baseline' value of all the other alignment properties works. But for sure this needs to be clarified in the definition of 'vertical-align'.

@atanassov atanassov removed the Agenda+ label Jun 22, 2016
@fantasai fantasai changed the title [css-grid][css-align][css-inline] Which baseline to use as alignment baseline for grid container? [css-align][css-inline] Which baseline to use as alignment baseline for grid container? Jul 6, 2016
@fantasai fantasai changed the title [css-align][css-inline] Which baseline to use as alignment baseline for grid container? [css-inline] Which baseline to use as alignment baseline for grid container? Jul 6, 2016
@fantasai fantasai removed the css-align-3 Current Work label Jul 6, 2016
@fantasai
Copy link
Collaborator

fantasai commented Jul 6, 2016

Resolved: https://lists.w3.org/Archives/Public/www-style/2016Jun/0158.html
This (the fact that all boxes except inline-blocks use the first baseline set) needs to go into the definition of 'vertical-align: baseline'.

@fantasai
Copy link
Collaborator

This is now captured in the definition of baseline-source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants