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

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

Issue 2278383002: [MD History] Use box-shadow to render card shadows everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@disable_test
Patch Set: add comments 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"> 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"> 6 <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">
7 <link rel="import" href="chrome://resources/html/icon.html"> 8 <link rel="import" href="chrome://resources/html/icon.html">
8 <link rel="import" href="chrome://resources/html/util.html"> 9 <link rel="import" href="chrome://resources/html/util.html">
9 <link rel="import" href="chrome://history/browser_service.html"> 10 <link rel="import" href="chrome://history/browser_service.html">
10 <link rel="import" href="chrome://history/constants.html"> 11 <link rel="import" href="chrome://history/constants.html">
11 <link rel="import" href="chrome://history/searched_label.html"> 12 <link rel="import" href="chrome://history/searched_label.html">
12 <link rel="import" href="chrome://history/shared_style.html"> 13 <link rel="import" href="chrome://history/shared_style.html">
13 14
14 <dom-module id="history-item"> 15 <dom-module id="history-item">
15 <template> 16 <template>
16 <style include="shared-style"> 17 <style include="shared-style">
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 height: 16px; 110 height: 16px;
110 width: 16px; 111 width: 16px;
111 } 112 }
112 113
113 #time-gap-separator { 114 #time-gap-separator {
114 -webkit-border-start: 1px solid #888; 115 -webkit-border-start: 1px solid #888;
115 -webkit-margin-start: 77px; 116 -webkit-margin-start: 77px;
116 height: 15px; 117 height: 15px;
117 } 118 }
118 119
119 #background { 120 #background-clip {
120 background: #fff; 121 /* Prevent artifacts when zoomed by overlapping the next item. */
121 bottom: -1px; /* Prevents shadow artifacts when zoomed */ 122 bottom: -0.4px;
123 clip: rect(auto 999px auto -5px); /* Clip the top and bottom edges. */
122 left: 0; 124 left: 0;
123 position: absolute; 125 position: absolute;
124 right: 0; 126 right: 0;
127 top: 0;
128 }
129
130 :host([is-card-end]) #background-clip {
131 bottom: 0;
132 clip: rect(auto 999px 500px -5px); /* Clip the top edge. */
133 }
134
135 #background {
136 @apply(--shadow-elevation-2dp);
137 background: #fff;
138 bottom: 0;
139 left: 0;
140 position: absolute;
141 right: 0;
125 top: 0; 142 top: 0;
126 z-index: -1; 143 z-index: -1;
127 } 144 }
128 145
129 :host([embedded]) #background { 146 :host([embedded]) #background {
130 display: none; 147 display: none;
131 } 148 }
132 149
150 :host(:not([is-card-start])) #background {
151 top: -5px; /* Draw the box shadow up the full edge of the background. */
152 }
153
133 :host([is-card-start]) #background { 154 :host([is-card-start]) #background {
134 border-radius: 2px 2px 0 0; 155 border-radius: 2px 2px 0 0;
135 } 156 }
136 157
137 :host([is-card-end]) #background { 158 :host([is-card-end]) #background {
138 border-radius: 0 0 2px 2px; 159 border-radius: 0 0 2px 2px;
139 bottom: 0; 160 }
161
162 :host([is-card-start][is-card-end]) #background {
163 border-radius: 2px;
140 } 164 }
141 </style> 165 </style>
142 166
143 <div id="sizing-container"> 167 <div id="sizing-container">
144 <div id="main-container"> 168 <div id="main-container">
145 <div id="background"></div> 169 <div id="background-clip">
170 <div id="background"></div>
171 </div>
146 <div id="date-accessed" class="card-title"> 172 <div id="date-accessed" class="card-title">
147 [[cardTitle_(numberOfItems, item.dateRelativeDay, searchTerm)]] 173 [[cardTitle_(numberOfItems, item.dateRelativeDay, searchTerm)]]
148 </div> 174 </div>
149 <div id="item-container"> 175 <div id="item-container">
150 <paper-checkbox id="checkbox" on-mousedown="onCheckboxMousedown_" 176 <paper-checkbox id="checkbox" on-mousedown="onCheckboxMousedown_"
151 on-click="onCheckboxSelected_" checked="{{selected}}" 177 on-click="onCheckboxSelected_" checked="{{selected}}"
152 disabled="[[selectionNotAllowed_()]]" 178 disabled="[[selectionNotAllowed_()]]"
153 aria-label$="[[getEntrySummary_(item)]]"> 179 aria-label$="[[getEntrySummary_(item)]]">
154 </paper-checkbox> 180 </paper-checkbox>
155 <span id="time-accessed">[[item.readableTimestamp]]</span> 181 <span id="time-accessed">[[item.readableTimestamp]]</span>
(...skipping 22 matching lines...) Expand all
178 <div></div> 204 <div></div>
179 <div></div> 205 <div></div>
180 </button> 206 </button>
181 </div> 207 </div>
182 <div id="time-gap-separator" hidden="[[!hasTimeGap]]"></div> 208 <div id="time-gap-separator" hidden="[[!hasTimeGap]]"></div>
183 </div> 209 </div>
184 </div> 210 </div>
185 </template> 211 </template>
186 <script src="chrome://history/history_item.js"></script> 212 <script src="chrome://history/history_item.js"></script>
187 </dom-module> 213 </dom-module>
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/grouped_list.html ('k') | chrome/browser/resources/md_history/history_list.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698