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-a11y-keys-behavior /iron-a11y-keys-behavior.html"> | 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-a11y-keys-behavior /iron-a11y-keys-behavior.html"> |
3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-selector/iron-sele ctor.html"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-selector/iron-sele ctor.html"> |
4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-ripple/paper-ripp le.html"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-ripple/paper-ripp le.html"> |
5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html "> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html "> |
6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/typography .html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/typography .html"> |
7 <link rel="import" href="chrome://history/browser_service.html"> | 7 <link rel="import" href="chrome://history/browser_service.html"> |
8 <link rel="import" href="chrome://history/shared_style.html"> | 8 <link rel="import" href="chrome://history/shared_style.html"> |
9 | 9 |
10 <dom-module id="history-side-bar"> | 10 <dom-module id="history-side-bar"> |
11 <template> | 11 <template> |
12 <style include="shared-style"> | 12 <style include="shared-style"> |
13 :host { | 13 :host { |
14 display: block; | 14 display: flex; |
15 flex-direction: column; | |
lshang
2016/10/12 05:15:29
nit: There is only one single iron-selector elemen
tsergeant
2016/10/12 06:06:45
Done.
| |
15 height: 100%; | 16 height: 100%; |
16 padding-top: 5px; | 17 overflow-x: hidden; |
18 overflow-y: auto; | |
17 width: var(--side-bar-width); | 19 width: var(--side-bar-width); |
18 } | 20 } |
19 | 21 |
22 :host([drawer]) { | |
23 height: calc(100% - var(--toolbar-height)); | |
lshang
2016/10/12 05:15:29
nit: could this be calc(100% - var(|height of draw
tsergeant
2016/10/12 06:06:45
As discussed, I'm leaving this as-is without renam
| |
24 } | |
25 | |
20 div.separator { | 26 div.separator { |
21 background-color: rgba(0, 0, 0, 0.08); | 27 background-color: rgba(0, 0, 0, 0.08); |
28 flex-shrink: 0; | |
22 height: 1px; | 29 height: 1px; |
23 margin: 8px 0; | 30 margin: 8px 0; |
24 } | 31 } |
25 | 32 |
26 #clear-browsing-data { | 33 #clear-browsing-data { |
27 justify-content: space-between; | 34 justify-content: space-between; |
28 } | 35 } |
29 | 36 |
30 #clear-browsing-data iron-icon { | 37 #clear-browsing-data iron-icon { |
31 -webkit-margin-end: 24px; | 38 -webkit-margin-end: 24px; |
32 color: var(--paper-grey-400); | 39 color: var(--paper-grey-400); |
33 height: 20px; | 40 height: 20px; |
34 margin-bottom: 10px; | 41 margin-bottom: 10px; |
35 margin-top: 10px; | 42 margin-top: 10px; |
36 width: 20px; | 43 width: 20px; |
37 } | 44 } |
38 | 45 |
39 iron-selector { | 46 iron-selector { |
40 -webkit-user-select: none; | 47 -webkit-user-select: none; |
41 background-color: transparent; | 48 background-color: transparent; |
42 color: #5a5a5a; | 49 color: #5a5a5a; |
50 display: flex; | |
51 flex: 1; | |
52 flex-direction: column; | |
53 padding-top: 5px; | |
lshang
2016/10/12 05:15:29
nit: margins between "Tabs from other devices/Clea
tsergeant
2016/10/12 06:06:45
I've set it to 8px, which matches Settings
| |
43 } | 54 } |
44 | 55 |
45 iron-selector > a { | 56 iron-selector > a { |
46 @apply(--paper-font-subhead); | 57 @apply(--paper-font-subhead); |
47 -webkit-padding-start: 24px; | 58 -webkit-padding-start: 24px; |
48 align-items: center; | 59 align-items: center; |
49 box-sizing: border-box; | 60 box-sizing: border-box; |
50 color: inherit; | 61 color: inherit; |
51 cursor: pointer; | 62 cursor: pointer; |
52 display: flex; | 63 display: flex; |
53 font-size: 14px; | 64 font-size: 14px; |
54 font-weight: 500; | 65 font-weight: 500; |
55 min-height: 48px; | 66 min-height: 48px; |
56 position: relative; | 67 position: relative; |
57 text-decoration: none; | 68 text-decoration: none; |
58 } | 69 } |
59 | 70 |
60 iron-selector > a.iron-selected { | 71 iron-selector > a.iron-selected { |
61 color: var(--google-blue-500); | 72 color: var(--google-blue-500); |
62 font-weight: 500; | 73 } |
74 | |
75 #spacer { | |
76 flex: 1; | |
63 } | 77 } |
64 | 78 |
65 #footer { | 79 #footer { |
66 bottom: 0; | |
67 color: var(--paper-grey-600); | 80 color: var(--paper-grey-600); |
68 position: absolute; | |
69 width: var(--side-bar-width); | 81 width: var(--side-bar-width); |
70 } | 82 } |
71 | 83 |
72 :host([drawer]) #footer { | |
73 /* This compensates the 120px by which app-drawer protrudes under | |
74 * the viewport. */ | |
75 bottom: 120px; | |
76 } | |
77 | |
78 #footer-text { | 84 #footer-text { |
79 -webkit-padding-end: 16px; | 85 -webkit-padding-end: 16px; |
80 -webkit-padding-start: 24px; | 86 -webkit-padding-start: 24px; |
81 line-height: 20px; | 87 line-height: 20px; |
82 margin: 24px 0; | 88 margin: 24px 0; |
83 } | 89 } |
84 | 90 |
85 #footer a { | 91 #footer a { |
86 color: var(--google-blue-700); | 92 color: var(--google-blue-700); |
87 text-decoration: none; | 93 text-decoration: none; |
(...skipping 13 matching lines...) Expand all Loading... | |
101 $i18n{openTabsMenuItem} | 107 $i18n{openTabsMenuItem} |
102 <paper-ripple></paper-ripple> | 108 <paper-ripple></paper-ripple> |
103 </a> | 109 </a> |
104 <div class="separator"></div> | 110 <div class="separator"></div> |
105 <a href="chrome://settings/clearBrowserData" | 111 <a href="chrome://settings/clearBrowserData" |
106 on-tap="onClearBrowsingDataTap_" id="clear-browsing-data"> | 112 on-tap="onClearBrowsingDataTap_" id="clear-browsing-data"> |
107 $i18n{clearBrowsingData} | 113 $i18n{clearBrowsingData} |
108 <iron-icon icon="cr:open-in-new"></iron-icon> | 114 <iron-icon icon="cr:open-in-new"></iron-icon> |
109 <paper-ripple id="cbd-ripple"></paper-ripple> | 115 <paper-ripple id="cbd-ripple"></paper-ripple> |
110 </a> | 116 </a> |
117 <div id="spacer"></div> | |
111 <div id="footer" hidden="[[!showFooter]]"> | 118 <div id="footer" hidden="[[!showFooter]]"> |
112 <div class="separator"></div> | 119 <div class="separator"></div> |
113 <div id="footer-text">$i18nRaw{sidebarFooter}</div> | 120 <div id="footer-text">$i18nRaw{sidebarFooter}</div> |
114 </div> | 121 </div> |
115 </iron-selector> | 122 </iron-selector> |
116 </template> | 123 </template> |
117 <script src="chrome://history/side_bar.js"></script> | 124 <script src="chrome://history/side_bar.js"></script> |
118 </dom-module> | 125 </dom-module> |
OLD | NEW |