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

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: fix tests 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;
29 display: flex; 29 display: flex;
30 position: absolute; 30 position: absolute;
31 transition: opacity 100ms; 31 transition: opacity 100ms;
32 } 32 }
33 33
34 #menuButton { 34 #menuButton {
35 height: 32px; 35 height: 32px;
36 margin-bottom: 6px; 36 margin-bottom: 6px;
37 margin-top: 6px; 37 margin-top: 6px;
38 min-width: 32px; 38 min-width: 32px;
39 padding: 6px; 39 padding: 6px;
40 width: 32px; 40 width: 32px;
41 } 41 }
42 42
43 :host(:not([show-menu])) #menuButton {
44 display: none;
45 }
46
47 #centeredContent { 43 #centeredContent {
48 -webkit-margin-start: var(--cr-toolbar-field-margin, 0); 44 -webkit-margin-start: var(--cr-toolbar-field-margin, 0);
49 -webkit-padding-end: 12px;
50 display: flex; 45 display: flex;
51 flex: 1 1 0; 46 flex: 1 1 0;
52 justify-content: center; 47 justify-content: center;
53 } 48 }
54 49
50 :host([narrow_]) #centeredContent {
51 -webkit-padding-end: var(--cr-toolbar-field-end-padding, 12px);
52 }
53
54 :host(:not([narrow_])) h1 {
55 @apply(--cr-toolbar-header-wide);
56 }
57
55 :host(:not([narrow_])) #leftContent { 58 :host(:not([narrow_])) #leftContent {
56 max-width: calc((100% - var(--cr-toolbar-field-width) - 18px) / 2); 59 max-width: calc((100% - var(--cr-toolbar-field-width) - 18px) / 2);
60 @apply(--cr-toolbar-left-content-wide);
61 }
62
63 :host(:not([narrow_])) #rightContent {
64 @apply(--cr-toolbar-right-content-wide);
57 } 65 }
58 66
59 :host([narrow_]) #centeredContent { 67 :host([narrow_]) #centeredContent {
60 justify-content: flex-end; 68 justify-content: flex-end;
61 } 69 }
62 70
63 :host([narrow_][showing-search_]) #leftContent { 71 :host([narrow_][showing-search_]) #leftContent {
64 opacity: 0; 72 opacity: 0;
65 } 73 }
66 </style> 74 </style>
67 <div id="leftContent"> 75 <div id="leftContent">
68 <paper-icon-button id="menuButton" icon="cr:menu" on-tap="onMenuTap_" 76 <template is="dom-if" if="[[showMenu]]">
69 title="[[menuLabel]]"> 77 <paper-icon-button id="menuButton" icon="cr:menu" on-tap="onMenuTap_"
70 </paper-icon-button> 78 title="[[menuLabel]]">
79 </paper-icon-button>
80 </template>
71 <h1>[[pageName]]</h1> 81 <h1>[[pageName]]</h1>
72 </div> 82 </div>
73 83
74 <div id="centeredContent"> 84 <div id="centeredContent">
75 <cr-toolbar-search-field id="search" narrow="[[narrow_]]" 85 <cr-toolbar-search-field id="search" narrow="[[narrow_]]"
76 label="[[searchPrompt]]" clear-label="[[clearLabel]]" 86 label="[[searchPrompt]]" clear-label="[[clearLabel]]"
77 spinner-active="[[spinnerActive]]" 87 spinner-active="[[spinnerActive]]"
78 showing-search="{{showingSearch_}}"> 88 showing-search="{{showingSearch_}}">
79 </cr-toolbar-search-field> 89 </cr-toolbar-search-field>
80 <iron-media-query query="(max-width: 900px)" query-matches="{{narrow_}}"> 90 <iron-media-query query="(max-width: 900px)" query-matches="{{narrow_}}">
81 </iron-media-query> 91 </iron-media-query>
82 </div> 92 </div>
93
94 <div id="rightContent">
95 <content select=".more-actions"></content>
96 </div>
83 </template> 97 </template>
84 <script src="cr_toolbar.js"></script> 98 <script src="cr_toolbar.js"></script>
85 </dom-module> 99 </dom-module>
OLDNEW
« no previous file with comments | « chrome/test/data/webui/md_history/history_drawer_test.js ('k') | ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698