-
Notifications
You must be signed in to change notification settings - Fork 715
[css-align] Mixing baseline self-alignment with random content alignments #3006
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
Comments
Wait, hmm, you have to do layout of the element before you can self-align anyway, because you need a size. So I guess there's nothing wrong with content-alignment affecting where the baseline sits when self-aligning. |
The Working Group just discussed The full IRC log of that discussion<dael> Topic: Mixing baseline self-alignment with random content alignments<dael> github: https://github.com//issues/3006 <dael> TabAtkins: I just commented in issue. I thinkg maybe jsut consfused. How can y ou mix abseline self alignment with any other. Baseline cares about your height. Seems odd how it interacted. now that I thought about it you have to do layout before self align so it's not a problem to do content alignment first and if you do center baseline is in center of element. <dael> TabAtkins: So I think this i s close invalid. <dael> florian: Is there no risk o f a dependency betweeen sizing and placing things? When you align on baseline can that cause things to grow? Or does that problem not exist? <dael> TabAtkins: Good question. I should consider that futher. <dael> florian: If that's okay, we're okay. If not we have a problem <dael> fantasai: What you say makes sense if item itself has a size. You can align and then baseline align. Trickier thing what if it's sized as auto and that auto size is not purely shrinkwrapping around content. <dael> fantasai: Where that box is positioned can change size of alignment container and then change alignment of content. <dael> TabAtkins: Can we table for a full example? Example in issue isn't complex enough to show problem. <dael> astearns: Okay, we'll come back with a more complex example <dael> fantasai: And anyone with examples, let us know. |
Is this the problem we're talking about: If Or am I missing something? |
Missing something - the issue is align-content and align-self on the same element, so you're self-aligning (moving yourself within your container) according to a baseline that is being positioned by content-alignment (moving your contents within yourself). |
aha! Makes more sense. So the issue would be this:
However, it seems this can only happen if:
I don't think this situation actually exists. Or am I still missing something? |
Right, I think you've got it now, and I also think this can't occur currently, but @fantasai was trying to explain a situation where this could occur on the call. I couldn't follow along her verbal explanation and asked for a written-out example here in this thread. |
Closing, but flagging for a testcase to make sure this combo does indeed work as intended. |
It doesn't seem to be clear what happens with, e.g.,
align-self: baseline; align-content: center;
The text was updated successfully, but these errors were encountered: