Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Side by Side Diff: ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.html

Issue 2275653002: MD Downloads: use "big search" box like MD history (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dl-menu-rtl
Patch Set: closure fixes Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <link rel="import" href="chrome://resources/html/polymer.html"> 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"> 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/polymer/v1_0/paper-icon-button/paper -icon-button.html"> 3 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html">
4 <link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar_se arch_field.html"> 4 <link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar_se arch_field.html">
5 5
6 <dom-module id="cr-toolbar"> 6 <dom-module id="cr-toolbar">
7 <template> 7 <template>
8 <style> 8 <style>
9 :host { 9 :host {
10 --cr-toolbar-field-width: 580px; 10 --cr-toolbar-field-width: 580px;
11 color: #fff; 11 color: #fff;
12 display: flex; 12 display: flex;
13 height: 56px; 13 height: 56px;
14 } 14 }
15 15
16 h1 { 16 h1 {
17 @apply(--layout-flex);
18 -webkit-margin-start: 6px; 17 -webkit-margin-start: 6px;
18 flex: 1;
19 font-size: 123%; 19 font-size: 123%;
20 font-weight: 400; 20 font-weight: 400;
21 text-overflow: ellipsis; 21 text-overflow: ellipsis;
22 overflow: hidden; 22 overflow: hidden;
23 white-space: nowrap; 23 white-space: nowrap;
24 } 24 }
25 25
26 #leftContent { 26 #leftContent {
27 -webkit-margin-start: 18px; 27 -webkit-margin-start: 18px;
28 align-items: center; 28 align-items: center;
(...skipping 10 matching lines...) Expand all
39 padding: 6px; 39 padding: 6px;
40 width: 32px; 40 width: 32px;
41 } 41 }
42 42
43 :host(:not([show-menu])) #menuButton { 43 :host(:not([show-menu])) #menuButton {
44 display: none; 44 display: none;
45 } 45 }
46 46
47 #centeredContent { 47 #centeredContent {
48 -webkit-margin-start: var(--cr-toolbar-field-margin, 0); 48 -webkit-margin-start: var(--cr-toolbar-field-margin, 0);
49 -webkit-padding-end: 12px; 49 -webkit-padding-end: var(--cr-toolbar-field-end-padding, 12px);
50 display: flex; 50 display: flex;
51 flex: 1 1 0; 51 flex: 1 1 0;
52 justify-content: center; 52 justify-content: center;
53 } 53 }
54 54
55 :host(:not([narrow_])) h1 {
56 @apply(--cr-toolbar-header-wide);
57 }
58
55 :host(:not([narrow_])) #leftContent { 59 :host(:not([narrow_])) #leftContent {
56 max-width: calc((100% - var(--cr-toolbar-field-width) - 18px) / 2); 60 max-width: calc((100% - var(--cr-toolbar-field-width) - 18px) / 2);
61 @apply(--cr-toolbar-left-content-wide);
62 }
63
64 :host(:not([narrow_])) #rightContent {
65 @apply(--cr-toolbar-right-content-wide);
57 } 66 }
58 67
59 :host([narrow_]) #centeredContent { 68 :host([narrow_]) #centeredContent {
60 justify-content: flex-end; 69 justify-content: flex-end;
61 } 70 }
62 71
63 :host([narrow_][showing-search_]) #leftContent { 72 :host([narrow_][showing-search_]) #leftContent {
64 opacity: 0; 73 opacity: 0;
65 } 74 }
66 </style> 75 </style>
67 <div id="leftContent"> 76 <div id="leftContent">
68 <paper-icon-button id="menuButton" icon="cr:menu" on-tap="onMenuTap_" 77 <template is="dom-if" if="[[menuLabel]]">
tsergeant 2016/08/24 01:09:37 We already have the button hiding from the [show-m
Dan Beam 2016/08/24 02:48:03 Acknowledged.
69 title="[[menuLabel]]"> 78 <paper-icon-button id="menuButton" icon="cr:menu" on-tap="onMenuTap_"
70 </paper-icon-button> 79 title="[[menuLabel]]">
80 </paper-icon-button>
81 </template>
71 <h1>[[pageName]]</h1> 82 <h1>[[pageName]]</h1>
72 </div> 83 </div>
73 84
74 <div id="centeredContent"> 85 <div id="centeredContent">
75 <cr-toolbar-search-field id="search" narrow="[[narrow_]]" 86 <cr-toolbar-search-field id="search" narrow="[[narrow_]]"
76 label="[[searchPrompt]]" clear-label="[[clearLabel]]" 87 label="[[searchPrompt]]" clear-label="[[clearLabel]]"
77 spinner-active="[[spinnerActive]]" 88 spinner-active="[[spinnerActive]]"
78 showing-search="{{showingSearch_}}"> 89 showing-search="{{showingSearch_}}">
79 </cr-toolbar-search-field> 90 </cr-toolbar-search-field>
80 <iron-media-query query="(max-width: 900px)" query-matches="{{narrow_}}"> 91 <iron-media-query query="(max-width: 900px)" query-matches="{{narrow_}}">
81 </iron-media-query> 92 </iron-media-query>
82 </div> 93 </div>
94
95 <div id="rightContent">
96 <content select=".more-actions"></content>
tsergeant 2016/08/24 01:09:37 Cool, I was just about to implement something simi
Dan Beam 2016/08/24 02:48:03 Acknowledged.
97 </div>
83 </template> 98 </template>
84 <script src="cr_toolbar.js"></script> 99 <script src="cr_toolbar.js"></script>
85 </dom-module> 100 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698