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

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

Issue 2562393003: MD WebUI: Simplify cr-toolbar CSS (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « chrome/browser/resources/md_history/history_toolbar.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 padding: 6px; 43 padding: 6px;
44 width: 32px; 44 width: 32px;
45 } 45 }
46 46
47 #centeredContent { 47 #centeredContent {
48 display: flex; 48 display: flex;
49 flex: 1 1 0; 49 flex: 1 1 0;
50 justify-content: center; 50 justify-content: center;
51 } 51 }
52 52
53 :host([narrow_]) #centeredContent {
54 -webkit-padding-end: var(--cr-toolbar-field-end-padding, 12px);
55 }
56
57 :host(:not([narrow_])) h1 {
58 @apply(--cr-toolbar-header-wide);
59 }
60
61 :host(:not([narrow_])) #leftContent { 53 :host(:not([narrow_])) #leftContent {
62 /* The amount of space left of the search field: 54 /* The amount of space left of the search field:
63 (width of window - width of search field) / 2. */ 55 (width of window - width of search field) / 2. */
64 max-width: calc((100% - var(--cr-toolbar-field-width)) / 2); 56 max-width: calc((100% - var(--cr-toolbar-field-width)) / 2);
65 @apply(--cr-toolbar-left-content-wide);
66 } 57 }
67 58
68 :host(:not([narrow_])) #centeredContent { 59 :host(:not([narrow_])) #centeredContent {
69 -webkit-margin-start: var(--cr-toolbar-field-margin, 0); 60 -webkit-margin-start: var(--cr-toolbar-field-margin, 0);
70 } 61 }
71 62
72 :host(:not([narrow_])) #rightContent {
73 @apply(--cr-toolbar-right-content-wide);
74 }
75
76 :host([narrow_]) #centeredContent { 63 :host([narrow_]) #centeredContent {
77 justify-content: flex-end; 64 justify-content: flex-end;
78 } 65 }
79 66
80 :host([narrow_][showing-search_]) #leftContent { 67 :host([narrow_][showing-search_]) #leftContent {
81 opacity: 0; 68 opacity: 0;
82 } 69 }
83 70
71 #rightContent {
72 -webkit-padding-end: var(--cr-toolbar-field-end-padding, 12px);
Dan Beam 2016/12/13 07:09:01 who sets --cr-toolbar-field-end-padding now?
tsergeant 2016/12/13 23:53:47 No-one, so I've removed it.
73 }
74
75 :host(:not([narrow_])) #rightContent {
76 position: absolute;
77 right: 0;
78 }
79
80 :host-context([dir=rtl]):host(:not([narrow_])) #rightContent {
81 right: auto;
82 left: 0;
83 }
84
84 #menuPromo { 85 #menuPromo {
85 -webkit-padding-end: 12px; 86 -webkit-padding-end: 12px;
86 -webkit-padding-start: 8px; 87 -webkit-padding-start: 8px;
87 align-items: center; 88 align-items: center;
88 background: #616161; 89 background: #616161;
89 border-radius: 2px; 90 border-radius: 2px;
90 color: white; 91 color: white;
91 display: flex; 92 display: flex;
92 font-size: 92.3%; 93 font-size: 92.3%;
93 font-weight: 500; 94 font-weight: 500;
94 opacity: 0; 95 opacity: 0;
95 padding-bottom: 6px; 96 padding-bottom: 6px;
96 padding-top: 6px; 97 padding-top: 6px;
97 position: absolute; 98 position: absolute;
98 top: var(--cr-toolbar-height); 99 top: var(--cr-toolbar-height);
99 white-space: nowrap; 100 white-space: nowrap;
100 z-index: 2; 101 z-index: 2;
101 } 102 }
102 103
103 #menuPromo::before { 104 #menuPromo::before {
104 background: inherit; 105 background: inherit;
105 /* Up arrow. 105% in Y coordinates fixes glitch at 110/125% zoom. */ 106 /* Up arrow. 105% in Y coordinates fixes glitch at 110/125% zoom. */
106 clip-path: polygon(0 105%, 100% 105%, 50% 0); 107 clip-path: polygon(0 105%, 100% 105%, 50% 0);
107 content: ''; 108 content: '';
108 display: block; 109 display: block;
109 left: 10px; 110 left: 10px;
110 height: 6px; 111 height: 6px;
111 position: absolute; 112 position: absolute;
112 top: -6px; 113 top: -6px;
113 width: 12px; 114 width: 12px;
114 } 115 }
115 116
116 :host-context([dir=rtl]) #menuPromo::before { 117 :host-context([dir=rtl]) #menuPromo::before {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 <iron-media-query query="(max-width: 900px)" query-matches="{{narrow_}}"> 158 <iron-media-query query="(max-width: 900px)" query-matches="{{narrow_}}">
158 </iron-media-query> 159 </iron-media-query>
159 </div> 160 </div>
160 161
161 <div id="rightContent"> 162 <div id="rightContent">
162 <content select=".more-actions"></content> 163 <content select=".more-actions"></content>
163 </div> 164 </div>
164 </template> 165 </template>
165 <script src="cr_toolbar.js"></script> 166 <script src="cr_toolbar.js"></script>
166 </dom-module> 167 </dom-module>
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/history_toolbar.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698