-
Notifications
You must be signed in to change notification settings - Fork 698
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-grid] Synthesizing baselines for elements orthogonal to the baseline-axis #1038
Comments
Please, @tabatkins @fantasai could you take a look at this issue ? Not that it's specially urgent, but I m afraid it gets lost, since it's not even tagged yet. Thanks. |
Hi @javifernandez , you lost me in the last paragraph. Can you give an example in code, please? :) |
Only the row-axis (justify-self) applies as baseline-axis, which determines we must select items which All items have a block flow direction parallel to the alignment context's axis, hence we must treat them as:
As the CSS Sizing spec states, we must synthesized the items' baseline using their under border edge. If we use the table defined in the CSS Writing Modes spec, we should map under to bottom because the items are horizontal. However, that doesn't make sense because the baseline-axis is the row axis, in this case, the horizontal axis. So, I assumed that we must treat those items as orthogonal to the grid container, hence vertical, so that we map under to left I wonder whether my assumption is correct, and in that case, whether it's properly described in the specs. |
You're right, it's not properly described in the specs. We've attempted to fix that. Let us know if it seems okay now? :) |
Good, thanks fr clarifying this in the specs. |
The CSS Box Alignment spec states the following:
https://drafts.csswg.org/css-align-3/#baseline-terms
When applied to actual orthogonal items (orthogonal flow respecting the grid container), the text above matches perfectly to what the CSS Writing Modes spec states about synthesizing baselines:
https://drafts.csswg.org/css-writing-modes-3/#replaced-baselines
Well, the CSS Box Alignment spec clarifies that the edges used to synthesize the baseline depend on the formatting context:
https://drafts.csswg.org/css-align-3/#synthesize-baselines
Hence, for grid items it seems that under border edge must be used to synthesize elements orthogonal to the baseline-axis (or equivalent, parallel to the alignment context’s axis). As I said, when applied to actual orthogonal boxes this under is resolved as bottom or left depending on the grid item's writing-mode. This makes a lot of sense, so far.
https://drafts.csswg.org/css-writing-modes-3/#logical-to-physical
But the spec states that we should treat in the same way parallel elements when they are orthogonal to the baseline-axis. Hence, that would imply that we will have to resolve the under logical direction assuming those elements are "orthogonal" to the grid container, instead of using strictly their writing mode. Is this assumption right ?
I'm attaching a picture of what I've implemented, so far.

The text was updated successfully, but these errors were encountered: