core-toolbar doesn't work properly with row flex-direction?

84 views
Skip to first unread message

Marco Scannadinari

unread,
Aug 27, 2014, 10:43:37 AM8/27/14
to polym...@googlegroups.com
Please see the attached screenshot beforehand

To try to push the paper-tabs to the right, and have the title take up the rest of  the parent's size, I applied flex-grow: 1 to the title, which works as expected with the red div (title takes up space - tabs pushed to right), but has no effect on the core-toolbar unless i set flex-direction to column, which makes no sense, as flex-grow is for the main axis, not the cross axis.

See index.html and style.css for source
Screenshot from 2014-08-27 15:36:03.png
index.html
style.css

Frankie Fu

unread,
Aug 27, 2014, 3:27:04 PM8/27/14
to Marco Scannadinari, polymer-dev
The items (title, tabs) put inside core-toolbar are projected and put in a flex layout div inside shadowdom so setting display: flex on core-toolbar isn't necessary.  As a matter of fact that causes the issue.  So if you remove display: flex from core-toolbar then it will work.

Here is a working example:



Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/47d0d2e3-92cf-4cd1-b53c-621acf48ed31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marco Scannadinari

unread,
Aug 27, 2014, 7:00:33 PM8/27/14
to polym...@googlegroups.com, m...@scannadinari.co.uk
Thanks so much! Was there documentation about this that I should have looked at?

Frankie Fu

unread,
Aug 27, 2014, 7:18:24 PM8/27/14
to Marco Scannadinari, polymer-dev
Yeah we are missing doc about this.  I filed an issue here: https://github.com/Polymer/core-toolbar/issues/10


Reply all
Reply to author
Forward
0 new messages