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

Side by Side Diff: chrome/browser/resources/md_history/history_item.html

Issue 2336503002: Replace paper-checkbox with a paper-icon-button-light (Closed)
Patch Set: fix closure + slightly more descriptive method 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/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
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: 70%;
98 transform: scale(0) rotate(45deg);
99 transform-origin: 97% 86%;
100 width: 36%;
101 }
102
103 :host-context([dir='rtl']) #checkmark::after {
104 transform-origin: 50% 14%;
105 }
106
107 :host([selected]) #checkmark {
108 background: var(--checked-color);
109 border-color: var(--checked-color);
110 }
111
112 :host([selected]) #checkmark::after {
113 border-color: white;
114 transform: scale(1) rotate(45deg);
115 /* Only animate when showing checkmark. */
116 transition: transform 140ms ease-out;
80 } 117 }
81 118
82 #time-accessed { 119 #time-accessed {
83 color: #646464; 120 color: #646464;
84 min-width: 96px; 121 min-width: 96px;
85 } 122 }
86 123
87 #domain { 124 #domain {
88 -webkit-margin-start: 16px; 125 -webkit-margin-start: 16px;
89 color: var(--secondary-text-color); 126 color: var(--secondary-text-color);
90 flex-shrink: 0; 127 flex-shrink: 0;
91 } 128 }
92 129
93 #menu-button { 130 #menu-button {
94 -webkit-margin-end: 12px; 131 -webkit-margin-end: 12px;
95 } 132 }
96 133
97 #star-container { 134 #star-container {
98 -webkit-margin-end: 4px; 135 -webkit-margin-end: 4px;
99 -webkit-margin-start: 12px; 136 -webkit-margin-start: 12px;
100 width: 32px; 137 width: 32px;
101 } 138 }
102 139
103 #bookmark-star { 140 #bookmark-star {
104 color: rgb(68, 136, 255); 141 color: var(--checked-color);
105 height: 32px; 142 height: 32px;
106 width: 32px; 143 width: 32px;
107 } 144 }
108 145
109 #bookmark-star iron-icon { 146 #bookmark-star iron-icon {
110 height: 16px; 147 height: 16px;
111 width: 16px; 148 width: 16px;
112 } 149 }
113 150
114 #time-gap-separator { 151 #time-gap-separator {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 203
167 <div id="sizing-container"> 204 <div id="sizing-container">
168 <div id="main-container"> 205 <div id="main-container">
169 <div id="background-clip"> 206 <div id="background-clip">
170 <div id="background"></div> 207 <div id="background"></div>
171 </div> 208 </div>
172 <div id="date-accessed" class="card-title"> 209 <div id="date-accessed" class="card-title">
173 [[cardTitle_(numberOfItems, item.dateRelativeDay, searchTerm)]] 210 [[cardTitle_(numberOfItems, item.dateRelativeDay, searchTerm)]]
174 </div> 211 </div>
175 <div id="item-container"> 212 <div id="item-container">
176 <paper-checkbox id="checkbox" on-mousedown="onCheckboxMousedown_" 213 <button is="paper-icon-button-light" id="checkbox"
177 on-click="onCheckboxSelected_" checked="{{selected}}" 214 on-mousedown="onCheckboxMousedown_"
215 on-click="onCheckboxSelected_"
178 disabled="[[selectionNotAllowed_()]]" 216 disabled="[[selectionNotAllowed_()]]"
217 role="checkbox"
218 aria-checked$="[[getAriaChecked_(selected)]]"
179 aria-label$="[[getEntrySummary_(item)]]"> 219 aria-label$="[[getEntrySummary_(item)]]">
180 </paper-checkbox> 220 <div id="checkmark"></div>
221 </button>
181 <span id="time-accessed">[[item.readableTimestamp]]</span> 222 <span id="time-accessed">[[item.readableTimestamp]]</span>
182 <div class="website-icon" id="icon"></div> 223 <div class="website-icon" id="icon"></div>
183 <div id="title-and-domain"> 224 <div id="title-and-domain">
184 <a href="[[item.url]]" id="title" class="website-title" 225 <a href="[[item.url]]" id="title" class="website-title"
185 title="[[item.title]]" on-click="onLinkClick_" 226 title="[[item.title]]" on-click="onLinkClick_"
186 on-contextmenu="onLinkRightClick_"> 227 on-contextmenu="onLinkRightClick_">
187 <history-searched-label title="[[item.title]]" 228 <history-searched-label title="[[item.title]]"
188 search-term="[[searchTerm]]"></history-searched-label> 229 search-term="[[searchTerm]]"></history-searched-label>
189 </a> 230 </a>
190 <span id="domain">[[item.domain]]</span> 231 <span id="domain">[[item.domain]]</span>
(...skipping 13 matching lines...) Expand all
204 <div></div> 245 <div></div>
205 <div></div> 246 <div></div>
206 </button> 247 </button>
207 </div> 248 </div>
208 <div id="time-gap-separator" hidden="[[!hasTimeGap]]"></div> 249 <div id="time-gap-separator" hidden="[[!hasTimeGap]]"></div>
209 </div> 250 </div>
210 </div> 251 </div>
211 </template> 252 </template>
212 <script src="chrome://history/history_item.js"></script> 253 <script src="chrome://history/history_item.js"></script>
213 </dom-module> 254 </dom-module>
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/app.vulcanized.html ('k') | chrome/browser/resources/md_history/history_item.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698