Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <link rel="import" href="chrome://resources/html/polymer.html"> | |
| 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-media-query/iron-m edia-query.html"> | |
| 3 <link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar_se arch_field.html"> | |
| 4 | |
| 5 <dom-module id="cr-toolbar"> | |
| 6 <template> | |
| 7 <style> | |
| 8 :host { | |
| 9 color: #fff; | |
| 10 display: flex; | |
| 11 height: 56px; | |
| 12 } | |
| 13 | |
| 14 h1 { | |
| 15 @apply(--layout-flex); | |
| 16 -webkit-padding-start: 24px; | |
| 17 font-size: 123%; | |
| 18 font-weight: 400; | |
| 19 } | |
| 20 | |
| 21 #leftContent { | |
| 22 align-items: center; | |
| 23 display: flex; | |
| 24 width: var(--side-bar-width, 0); | |
| 25 } | |
| 26 | |
| 27 #centeredContent { | |
| 28 -webkit-padding-end: 12px; | |
| 29 display: flex; | |
| 30 flex: 1 1 0; | |
| 31 justify-content: center; | |
| 32 } | |
| 33 | |
| 34 :host([narrow_]) #centeredContent { | |
| 35 justify-content: flex-end; | |
| 36 } | |
| 37 | |
| 38 :host([narrow_][showing-search_]) #leftContent { | |
| 39 display: none; | |
| 40 } | |
| 41 </style> | |
| 42 <div id="leftContent"> | |
| 43 <h1>[[pageName]]</h1> | |
| 44 </div> | |
| 45 | |
| 46 <div id="centeredContent"> | |
| 47 <cr-toolbar-search-field id="search" narrow="[[narrow_]]" | |
| 48 label="[[searchPrompt]]" clear-label="[[clearLabel]]" | |
| 49 showing-search="{{showingSearch_}}"> | |
|
dpapad
2016/05/26 00:42:52
Indentation is a bit unusual here, how about
<cr-
tsergeant
2016/05/26 01:34:52
"a poor craftsman blames their tools", but vim has
| |
| 50 </cr-toolbar-search-field> | |
| 51 <iron-media-query query="(max-width: 900px)" query-matches="{{narrow_}}"> | |
| 52 </iron-media-query> | |
| 53 </div> | |
| 54 </template> | |
| 55 <script src="cr_toolbar.js"></script> | |
| 56 </dom-module> | |
| OLD | NEW |