Bug 88390 - Can't justify content when only child of flex container is a text node
Summary: Can't justify content when only child of flex container is a text node
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 88443
Blocks: 62048
  Show dependency treegraph
 
Reported: 2012-06-05 20:34 PDT by Eric
Modified: 2012-06-13 13:52 PDT (History)
2 users (show)

See Also:


Attachments
test case (228 bytes, text/html)
2012-06-05 20:35 PDT, Eric
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric 2012-06-05 20:34:54 PDT
-webkit-justify-conten doesn't do anything. See attached. The text is the only
child of the parent <div> (flex container) and it should be centered vert/horiztonally.
Comment 1 Eric 2012-06-05 20:35:18 PDT
Created attachment 145921 [details]
test case
Comment 2 Ojan Vafai 2012-06-05 20:55:18 PDT
Looks like it might have been a renaming regression as well. Changing the test-case to the old names makes the text center on Chrome 21.0.1155.2 (Official Build 139341) dev.
Comment 3 Tony Chang 2012-06-06 09:44:41 PDT
Ah, this is because of the change in the initial value of flex.  Since the initial value is 1, the text stretches to take all the space and there's no room for justify-content.

This was brought up on the spec mailing list as to why we shouldn't have flexing by default.
Comment 4 Tony Chang 2012-06-13 13:52:57 PDT
This works for me now on Chrome Canary.  Looks like bug 88443 landing fixed this.