Nothing Special   »   [go: up one dir, main page]

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] how to position a baseline-sharing group containing items with different fallback alignment #3454

Open
MatsPalmgren opened this issue Dec 18, 2018 · 3 comments

Comments

@MatsPalmgren
Copy link

The spec text on how to position a baseline-sharing group seems confusing to me. I'll illustrate with an example:

<div style="display: grid; grid: 50px 50px / 200px;">
  <div style="writing-mode: vertical-lr; justify-self: baseline;">1<br>2</div>
  <div style="writing-mode: vertical-rl; justify-self: last baseline;">1<br>2</div>
</div>

§9.2 says (in the last bullet) that "opposite block flow direction and opposite baseline alignment preference" share the same baseline group, so the two items above are in the same group.

§9.3 says "Position the aligned baseline-sharing group within the alignment container according to the fallback alignment associated with the specified baseline alignment preference.".
The problem is that "baseline alignment preference" is associated with an item, not a group. In this case the two items have different fallback alignment, so the spec isn't clear how the group should be aligned.

It seems like the spec text in §9.3 assumes that all items in a group have the same specified alignment value, and thus the same fallback value.

I'm guessing that since the relevant baselines are on the same side visavi the container that the group should use start alignment in this case, but the spec could be clearer on this.

@fantasai fantasai added the css-align-3 Current Work label Dec 28, 2018
@MatsPalmgren
Copy link
Author

@fantasai ping? I would appreciate a clarification on this please so I can fix our implementation and write a test.

tabatkins added a commit that referenced this issue Jan 9, 2020
@fantasai
Copy link
Collaborator
fantasai commented Jan 9, 2020

@MatsPalmgren Sorry, ok, we fixed the issue (I think) by making sure the fallback alignments correspond sensibly in these mixed writing-mode cases. Does this solve the issue?

@tabatkins
Copy link
Member

It is still the case that the two items have different fallback alignments ("safe self-start" vs "safe self-end"). We're now certain that they'll agree once they resolve into physical directions, where previously they didn't; I'm unsure if that resolves Mats' complaint, tho.

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

3 participants