OLD | NEW |
---|---|
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-icon/iron-icon.htm l"> | |
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/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"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> |
5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-tooltip/paper-too ltip.html"> | |
4 <link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar_se arch_field.html"> | 6 <link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar_se arch_field.html"> |
7 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | |
5 | 8 |
6 <dom-module id="cr-toolbar"> | 9 <dom-module id="cr-toolbar"> |
7 <template> | 10 <template> |
8 <style> | 11 <style> |
9 :host { | 12 :host { |
10 --cr-toolbar-field-width: 580px; | 13 --cr-toolbar-field-width: 580px; |
11 color: #fff; | 14 color: #fff; |
12 display: flex; | 15 display: flex; |
13 height: 56px; | 16 height: 56px; |
14 } | 17 } |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 @apply(--cr-toolbar-right-content-wide); | 67 @apply(--cr-toolbar-right-content-wide); |
65 } | 68 } |
66 | 69 |
67 :host([narrow_]) #centeredContent { | 70 :host([narrow_]) #centeredContent { |
68 justify-content: flex-end; | 71 justify-content: flex-end; |
69 } | 72 } |
70 | 73 |
71 :host([narrow_][showing-search_]) #leftContent { | 74 :host([narrow_][showing-search_]) #leftContent { |
72 opacity: 0; | 75 opacity: 0; |
73 } | 76 } |
77 | |
78 paper-tooltip { | |
79 --paper-tooltip: { | |
80 align-items: center; | |
81 display: flex; | |
82 font-size: 92.3%; | |
83 font-weight: 500; | |
84 padding: 6px 12px 6px 8px; | |
85 white-space: nowrap; | |
86 }; | |
87 } | |
88 | |
89 iron-icon { | |
90 --iron-icon-height: 20px; | |
91 --iron-icon-width: 20px; | |
92 -webkit-margin-start: 12px; | |
93 } | |
94 | |
95 .arrow { | |
96 -webkit-clip-path: polygon(0 100%, 100% 100%, 50% 0); /* Up arrow. */ | |
97 background: inherit; | |
98 left: 10px; | |
99 height: 6px; | |
100 position: absolute; | |
101 top: -6px; | |
102 width: 12px; | |
103 } | |
74 </style> | 104 </style> |
75 <div id="leftContent"> | 105 <div id="leftContent"> |
76 <template is="dom-if" if="[[showMenu]]"> | 106 <template is="dom-if" if="[[showMenu]]"> |
77 <paper-icon-button id="menuButton" icon="cr:menu" on-tap="onMenuTap_" | 107 <paper-icon-button id="menuButton" icon="cr:menu" on-tap="onMenuTap_" |
78 title="[[menuLabel]]"> | 108 title="[[titleIfNotShowMenuPromo_(menuLabel, showMenuPromo)]]"> |
tsergeant
2016/09/09 06:09:39
Can you add `aria-label$="[[menuLabel]]"` so that
Dan Beam
2016/09/16 00:01:24
Done.
| |
79 </paper-icon-button> | 109 </paper-icon-button> |
110 <template is="dom-if" if="[[showMenuPromo]]"> | |
111 <paper-tooltip for="menuButton" position="bottom" offset="20" | |
112 manual-mode fit-to-visible-bounds> | |
113 <div class="arrow"></div> | |
114 [[menuPromo]] | |
115 <iron-icon icon="cr:clear" on-tap="onMenuPromoCloseTap_"> | |
116 </iron-icon> | |
117 </paper-tooltip> | |
118 </template> | |
80 </template> | 119 </template> |
81 <h1>[[pageName]]</h1> | 120 <h1>[[pageName]]</h1> |
82 </div> | 121 </div> |
83 | 122 |
84 <div id="centeredContent"> | 123 <div id="centeredContent"> |
85 <cr-toolbar-search-field id="search" narrow="[[narrow_]]" | 124 <cr-toolbar-search-field id="search" narrow="[[narrow_]]" |
86 label="[[searchPrompt]]" clear-label="[[clearLabel]]" | 125 label="[[searchPrompt]]" clear-label="[[clearLabel]]" |
87 spinner-active="[[spinnerActive]]" | 126 spinner-active="[[spinnerActive]]" |
88 showing-search="{{showingSearch_}}"> | 127 showing-search="{{showingSearch_}}"> |
89 </cr-toolbar-search-field> | 128 </cr-toolbar-search-field> |
90 <iron-media-query query="(max-width: 900px)" query-matches="{{narrow_}}"> | 129 <iron-media-query query="(max-width: 900px)" query-matches="{{narrow_}}"> |
91 </iron-media-query> | 130 </iron-media-query> |
92 </div> | 131 </div> |
93 | 132 |
94 <div id="rightContent"> | 133 <div id="rightContent"> |
95 <content select=".more-actions"></content> | 134 <content select=".more-actions"></content> |
96 </div> | 135 </div> |
97 </template> | 136 </template> |
98 <script src="cr_toolbar.js"></script> | 137 <script src="cr_toolbar.js"></script> |
99 </dom-module> | 138 </dom-module> |
OLD | NEW |