W3C home > Mailing lists > Public > www-style@w3.org > December 2017

Re: [css-align] A couple questions about CSS box alignment

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 20 Dec 2017 13:16:28 -0500
To: www-style@w3.org
Message-ID: <b15a7a94-e3cd-00fe-c985-f7c2313735c6@inkedblade.net>
On 12/19/2017 10:41 AM, Patrick Brosset wrote:
> I'm new to the CSS Box Alignment spec and I'm currently reading it from the point of view of someone trying to understand it 
> enough to imagine a browser devtools for aligning elements on a page.
> 
> To that end, I have a few questions. I'm sure they're quite beginner level, and I hope they're fine to ask here.
> 
> 1) Why does justify-content not work on block containers?
> It seems to me like that would be useful to align content along the inline axis nicely.

justify-self handles the alignment of the block-level elements within a block container;
to align all of them, you can use justify-items.

(It didn't make too much sense for us to introduce an intermediary concept of "all the
content of the block container as a unit" the way a column Flexbox has a flex line, so
we didn't.)

> 2) I don't understand how align-content is meant to work with multicol containers.
> The alignment subject is the entire column box which, I assumed, would take the full block size.
> But I'm guessing that's where I'm wrong. Are column boxes different sizes? Is this due to the break-* properties?

If a multicol container has a specified size that is taller than its columns,
then there is extra space to distribute. e.g.

<article style="columns: 3; height: 100vh;">
   ... not enough content to fill the height of <article>
</article>

Note that applying the alignment properties to block-level boxes and multicol
isn't well-implemented yet.

~fantasai
Received on Wednesday, 20 December 2017 18:17:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:09 UTC