W3C home > Mailing lists > Public > public-css-archive@w3.org > September 2017

Re: [csswg-drafts] [css-align] Vertical alignment for Grid/Flex items content

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Sat, 30 Sep 2017 22:32:10 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-333340274-1506810716-sysbot+gh@w3.org>
*All* children of a flexbox become flex items (raw text gets wrapped in an anonymous flex item).  This is intentional, and allows many good effects.

It does mean, as you discovered, that you can't use a Flexbox or Grid to center mixed inline content of an element.  Right now, you need a wrapper for that.  The Align spec defines how the alignment properties should work on `display:block`, tho, and when browsers implement that, you'll be able to vertically center the contents of a block element directly.

GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1838#issuecomment-333340274 using your GitHub account
Received on Saturday, 30 September 2017 22:31:59 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:18 UTC