PolymerElements / paper-toolbar

A Material Design toolbar/appbar
https://www.webcomponents.org/element/PolymerElements/paper-toolbar
40 stars 41 forks source link

Main icon & title styling flawed and complicated. #94

Open bwh-rl opened 7 years ago

bwh-rl commented 7 years ago

Description

As far as i understood the material design app bar, the title should always be in the same position (changes with screen size from 72dp to 80dp), and the main icon should also always be in the same position. https://material.google.com/layout/structure.html#structure-app-bar

The Styling right now has several problems:

The toolbar-tools > ::content > paper-icon-button + .title construct could maybe consider an hidden attribute but not an display: none;.

Imho an better and more simple solution could be (just a draft):

    <div id="topBar">
      <div style="fixWithForThemainIcon">
        <content select=".mainIcon"></content>
      </div>
      <content select=":not(.middle):not(.bottom)"></content>
    </div>

    <div id="middleBar" class$="toolbar-tools [[_computeBarExtraClasses(middleJustify)]]">
      <content select=".middle"></content>
    </div>

    <div id="bottomBar" class$="toolbar-tools [[_computeBarExtraClasses(bottomJustify)]]">
      <content select=".bottom"></content>
    </div>

If this would get accepted, i could start an PR.

Expected outcome

Actual outcome

Live Demo

Steps to reproduce

Browsers Affected