OLD | NEW |
---|---|
1 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 1 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
2 <link rel="import" href="chrome://resources/html/polymer.html"> | 2 <link rel="import" href="chrome://resources/html/polymer.html"> |
3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm l"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm l"> |
4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> |
5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html"> | |
6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button-light.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button-light.html"> |
7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/shadow.htm l"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/shadow.htm l"> |
8 <link rel="import" href="chrome://resources/html/icon.html"> | 7 <link rel="import" href="chrome://resources/html/icon.html"> |
9 <link rel="import" href="chrome://resources/html/util.html"> | 8 <link rel="import" href="chrome://resources/html/util.html"> |
10 <link rel="import" href="chrome://history/browser_service.html"> | 9 <link rel="import" href="chrome://history/browser_service.html"> |
11 <link rel="import" href="chrome://history/constants.html"> | 10 <link rel="import" href="chrome://history/constants.html"> |
12 <link rel="import" href="chrome://history/searched_label.html"> | 11 <link rel="import" href="chrome://history/searched_label.html"> |
13 <link rel="import" href="chrome://history/shared_style.html"> | 12 <link rel="import" href="chrome://history/shared_style.html"> |
14 | 13 |
15 <dom-module id="history-item"> | 14 <dom-module id="history-item"> |
16 <template> | 15 <template> |
17 <style include="shared-style"> | 16 <style include="shared-style"> |
18 :host { | 17 :host { |
18 --checked-color: rgb(68, 136, 255); | |
19 display: block; | 19 display: block; |
20 } | 20 } |
21 | 21 |
22 :host(:not([embedded])) #main-container { | 22 :host(:not([embedded])) #main-container { |
23 position: relative; | 23 position: relative; |
24 } | 24 } |
25 | 25 |
26 :host(:not([embedded])) #sizing-container { | 26 :host(:not([embedded])) #sizing-container { |
27 @apply(--card-sizing); | 27 @apply(--card-sizing); |
28 } | 28 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
62 } | 62 } |
63 | 63 |
64 #title-and-domain { | 64 #title-and-domain { |
65 align-items: center; | 65 align-items: center; |
66 display: flex; | 66 display: flex; |
67 flex: 1; | 67 flex: 1; |
68 height: var(--item-height); | 68 height: var(--item-height); |
69 overflow: hidden; | 69 overflow: hidden; |
70 } | 70 } |
71 | 71 |
72 paper-checkbox { | 72 #checkbox { |
73 --paper-checkbox-checked-color: rgb(68, 136, 255); | 73 -webkit-margin-end: 6px; |
74 --paper-checkbox-size: 16px; | 74 -webkit-margin-start: 10px; |
75 --paper-checkbox-unchecked-color: var(--secondary-text-color); | 75 height: 40px; |
76 height: 16px; | 76 width: 40px; |
77 margin: 0 16px 0 20px; | 77 } |
78 padding: 2px; | 78 |
79 width: 16px; | 79 :host([selected]) #checkbox { |
80 color: var(--checked-color); | |
81 } | |
82 | |
83 #checkmark { | |
84 border: 2px solid var(--secondary-text-color); | |
85 border-radius: 2px; | |
86 height: 12px; | |
87 margin: 12px; | |
88 width: 12px; | |
89 } | |
90 | |
91 #checkmark::after { | |
92 border-color: inherit; | |
93 border-style: solid; | |
94 border-width: 0 2px 2px 0; | |
95 content: ''; | |
96 display: block; | |
97 height: 8px; | |
98 transform: scale(0) rotate(45deg); | |
99 transform-origin: 97% 86%; | |
tsergeant
2016/09/12 23:24:57
paper-checkbox changes this transform-origin for R
Dan Beam
2016/09/13 05:23:00
I've done everything the <paper-checkbox> says! Ev
| |
100 transition: transform 140ms ease-out; | |
101 width: 4px; | |
102 } | |
103 | |
104 :host([selected]) #checkmark { | |
105 background: var(--checked-color); | |
106 border-color: var(--checked-color); | |
107 } | |
108 | |
109 :host([selected]) #checkmark::after { | |
110 border-color: white; | |
111 transform: scale(1) rotate(45deg); | |
80 } | 112 } |
81 | 113 |
82 #time-accessed { | 114 #time-accessed { |
83 color: #646464; | 115 color: #646464; |
84 min-width: 96px; | 116 min-width: 96px; |
85 } | 117 } |
86 | 118 |
87 #domain { | 119 #domain { |
88 -webkit-margin-start: 16px; | 120 -webkit-margin-start: 16px; |
89 color: var(--secondary-text-color); | 121 color: var(--secondary-text-color); |
90 flex-shrink: 0; | 122 flex-shrink: 0; |
91 } | 123 } |
92 | 124 |
93 #menu-button { | 125 #menu-button { |
94 -webkit-margin-end: 12px; | 126 -webkit-margin-end: 12px; |
95 } | 127 } |
96 | 128 |
97 #star-container { | 129 #star-container { |
98 -webkit-margin-end: 4px; | 130 -webkit-margin-end: 4px; |
99 -webkit-margin-start: 12px; | 131 -webkit-margin-start: 12px; |
100 width: 32px; | 132 width: 32px; |
101 } | 133 } |
102 | 134 |
103 #bookmark-star { | 135 #bookmark-star { |
104 color: rgb(68, 136, 255); | 136 color: var(--checked-color); |
105 height: 32px; | 137 height: 32px; |
106 width: 32px; | 138 width: 32px; |
107 } | 139 } |
108 | 140 |
109 #bookmark-star iron-icon { | 141 #bookmark-star iron-icon { |
110 height: 16px; | 142 height: 16px; |
111 width: 16px; | 143 width: 16px; |
112 } | 144 } |
113 | 145 |
114 #time-gap-separator { | 146 #time-gap-separator { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
166 | 198 |
167 <div id="sizing-container"> | 199 <div id="sizing-container"> |
168 <div id="main-container"> | 200 <div id="main-container"> |
169 <div id="background-clip"> | 201 <div id="background-clip"> |
170 <div id="background"></div> | 202 <div id="background"></div> |
171 </div> | 203 </div> |
172 <div id="date-accessed" class="card-title"> | 204 <div id="date-accessed" class="card-title"> |
173 [[cardTitle_(numberOfItems, item.dateRelativeDay, searchTerm)]] | 205 [[cardTitle_(numberOfItems, item.dateRelativeDay, searchTerm)]] |
174 </div> | 206 </div> |
175 <div id="item-container"> | 207 <div id="item-container"> |
176 <paper-checkbox id="checkbox" on-mousedown="onCheckboxMousedown_" | 208 <button is="paper-icon-button-light" id="checkbox" |
177 on-click="onCheckboxSelected_" checked="{{selected}}" | 209 on-mousedown="onCheckboxMousedown_" |
210 on-click="onCheckboxSelected_" | |
178 disabled="[[selectionNotAllowed_()]]" | 211 disabled="[[selectionNotAllowed_()]]" |
212 role="checkbox" | |
213 aria-checked$="[[getBoolString_(selected)]]" | |
179 aria-label$="[[getEntrySummary_(item)]]"> | 214 aria-label$="[[getEntrySummary_(item)]]"> |
180 </paper-checkbox> | 215 <div id="checkmark"></div> |
216 </button> | |
181 <span id="time-accessed">[[item.readableTimestamp]]</span> | 217 <span id="time-accessed">[[item.readableTimestamp]]</span> |
182 <div class="website-icon" id="icon"></div> | 218 <div class="website-icon" id="icon"></div> |
183 <div id="title-and-domain"> | 219 <div id="title-and-domain"> |
184 <a href="[[item.url]]" id="title" class="website-title" | 220 <a href="[[item.url]]" id="title" class="website-title" |
185 title="[[item.title]]" on-click="onLinkClick_" | 221 title="[[item.title]]" on-click="onLinkClick_" |
186 on-contextmenu="onLinkRightClick_"> | 222 on-contextmenu="onLinkRightClick_"> |
187 <history-searched-label title="[[item.title]]" | 223 <history-searched-label title="[[item.title]]" |
188 search-term="[[searchTerm]]"></history-searched-label> | 224 search-term="[[searchTerm]]"></history-searched-label> |
189 </a> | 225 </a> |
190 <span id="domain">[[item.domain]]</span> | 226 <span id="domain">[[item.domain]]</span> |
(...skipping 13 matching lines...) Expand all Loading... | |
204 <div></div> | 240 <div></div> |
205 <div></div> | 241 <div></div> |
206 </button> | 242 </button> |
207 </div> | 243 </div> |
208 <div id="time-gap-separator" hidden="[[!hasTimeGap]]"></div> | 244 <div id="time-gap-separator" hidden="[[!hasTimeGap]]"></div> |
209 </div> | 245 </div> |
210 </div> | 246 </div> |
211 </template> | 247 </template> |
212 <script src="chrome://history/history_item.js"></script> | 248 <script src="chrome://history/history_item.js"></script> |
213 </dom-module> | 249 </dom-module> |
OLD | NEW |