W3C home > Mailing lists > Public > www-style@w3.org > February 2015

Re: Shouldn't justify-content be renamed to justify-items?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 12 Feb 2015 08:16:27 +1100
Message-ID: <CAAWBYDBh2A9k8kBi3DVJhFeSDbeeg6Q1O9ioTE07DzNJwrsLEQ@mail.gmail.com>
To: "..." <no-cheating@autistici.org>
Cc: www-style list <www-style@w3.org>
On Thu, Feb 12, 2015 at 12:20 AM, ... <no-cheating@autistici.org> wrote:
> Can somebody lay me out the reasoning behind naming 3 Flexbox properties
> justify-content, align-items and align-content? I can't grasp the logic
> behind using terms items and content in the names the way they're used now.
> It seems to me that align-items is complementary to justify-content, as both
> of them act on flex items - the first aligns the items along the cross axis
> and the second along the main axis. align-content on the contrary act on the
> whole lines of flex items. I can't see any connection between
> justify-content and align-content, though their names would suggest there is
> some.
> And so it seems more logical for me if justify-content would be renamed to
> justify-items.
> I bet Flexbox module creators had some logic behind naming the things in the
> current manner. Probably I'm only not able to recognize it. Can somebody
> explain that to me?

The set of names used in Flexbox seem kinda eclectic if you don't know
the fuller story, which is defined in

There are actually six alignment properties: {justify, align}-{self,
content, items}.  Really only *-self and *-content matter, aligning an
element within its container and aligning the contents of a container
as a whole; *-items are convenience properties to let you set the
*-self properties on all the children of a container without having to
target them directly

Individual display types use subsets of those six properties, based on
what's appropriate.  Flexbox doesn't allow justify-self alignment,
because all the other flex items are in its way; its "alignment" is
done by flexing.  Similary for align-self on display:block, because it
just uses the names in the opposite way - align-self can't work
because all of the other elements are stacked above/below it already.
Grid layout, though, uses all six.

Received on Wednesday, 11 February 2015 21:17:14 UTC

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