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

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

Issue 2119113002: MD History: Fix item sizing in small windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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-flex-layout/iron-f lex-layout.html"> 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-f lex-layout.html">
4 <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/iron-icon/iron-icon.htm l">
5 <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-button/paper-butt on.html">
6 <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-checkbox/paper-ch eckbox.html">
7 <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-icon-button/paper -icon-button-light.html">
8 <link rel="import" href="chrome://resources/html/icon.html"> 8 <link rel="import" href="chrome://resources/html/icon.html">
9 <link rel="import" href="chrome://resources/html/util.html"> 9 <link rel="import" href="chrome://resources/html/util.html">
10 <link rel="import" href="chrome://history/browser_service.html"> 10 <link rel="import" href="chrome://history/browser_service.html">
11 <link rel="import" href="chrome://history/constants.html"> 11 <link rel="import" href="chrome://history/constants.html">
12 <link rel="import" href="chrome://history/searched_label.html"> 12 <link rel="import" href="chrome://history/searched_label.html">
13 <link rel="import" href="chrome://history/shared_style.html"> 13 <link rel="import" href="chrome://history/shared_style.html">
14 14
15 <dom-module id="history-item"> 15 <dom-module id="history-item">
16 <template> 16 <template>
17 <style include="shared-style"> 17 <style include="shared-style">
18 :host { 18 :host {
19 @apply(--layout-center); 19 display: block;
20 @apply(--layout-vertical);
21 padding: 0 var(--history-item-padding-side, 0);
22 } 20 }
23 21
24 #main-container { 22 :host(:not([embedded])) #main-container {
25 background: #fff; 23 background: #fff;
26 border-color: var(--card-border-color); 24 border-color: var(--card-border-color);
27 border-radius: 2px; 25 border-radius: 2px;
28 border-style: var(--border-style, solid); 26 border-style: solid;
29 border-width: 0 1px; 27 border-width: 0 1px;
30 max-width: var(--card-max-width); 28 }
31 min-width: var(--card-min-width); 29
32 width: 100%; 30 :host(:not([embedded])) #sizing-container {
31 @apply(--card-sizing);
33 } 32 }
34 33
35 :host([is-first-item]) #main-container { 34 :host([is-first-item]) #main-container {
36 margin-top: var(--first-card-padding-top); 35 margin-top: var(--first-card-padding-top);
37 } 36 }
38 37
39 :host([is-card-start]) #main-container { 38 :host([is-card-start]) #main-container {
40 border-top-width: 1px; 39 border-top-width: 1px;
41 } 40 }
42 41
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 :host([starred]) #bookmark-star { 124 :host([starred]) #bookmark-star {
126 visibility: visible; 125 visibility: visible;
127 } 126 }
128 127
129 #time-gap-separator { 128 #time-gap-separator {
130 -webkit-border-start: 1px solid #888; 129 -webkit-border-start: 1px solid #888;
131 -webkit-margin-start: 77px; 130 -webkit-margin-start: 77px;
132 height: 15px; 131 height: 15px;
133 } 132 }
134 </style> 133 </style>
135 <div id="main-container"> 134
136 <div id="date-accessed" class="card-title"> 135 <div id="sizing-container">
137 [[cardTitle_(numberOfItems, item.dateRelativeDay, searchTerm)]] 136 <div id="main-container">
137 <div id="date-accessed" class="card-title">
138 [[cardTitle_(numberOfItems, item.dateRelativeDay, searchTerm)]]
139 </div>
140 <div id="item-container">
141 <paper-checkbox id="checkbox" on-tap="onCheckboxSelected_"
142 checked="{{selected}}" disabled="[[selectionNotAllowed_()]]">
143 </paper-checkbox>
144 <span id="time-accessed">[[item.readableTimestamp]]</span>
145 <div class="website-icon" id="icon"></div>
146 <div id="title-and-domain">
147 <a href="[[item.url]]" id="title" class="website-title">
148 <history-searched-label title="[[cropItemTitle_(item.title)]]"
149 search-term="[[searchTerm]]"></history-searched-label>
150 </a>
151 <span id="domain">[[item.domain]]</span>
152 </div>
153 <button is="paper-icon-button-light" id="bookmark-star"
154 title="$i18n{removeBookmark}" on-tap="onRemoveBookmarkTap_">
155 <iron-icon icon="cr:star"></iron-icon>
156 </button>
157 <button is="paper-icon-button-light" id="menu-button"
158 on-tap="onMenuButtonTap_" title="$i18n{moreActionsButton}">
159 <iron-icon icon="cr:more-vert"></iron-icon>
160 </button>
161 </div>
162 <template is="dom-if" if="[[hasTimeGap]]">
163 <div id="time-gap-separator"></div>
164 </template>
138 </div> 165 </div>
139 <div id="item-container">
140 <paper-checkbox id="checkbox" on-tap="onCheckboxSelected_"
141 checked="{{selected}}" disabled="[[selectionNotAllowed_()]]">
142 </paper-checkbox>
143 <span id="time-accessed">[[item.readableTimestamp]]</span>
144 <div class="website-icon" id="icon"></div>
145 <div id="title-and-domain">
146 <a href="[[item.url]]" id="title" class="website-title">
147 <history-searched-label title="[[cropItemTitle_(item.title)]]"
148 search-term="[[searchTerm]]"></history-searched-label>
149 </a>
150 <span id="domain">[[item.domain]]</span>
151 </div>
152 <button is="paper-icon-button-light" id="bookmark-star"
153 title="$i18n{removeBookmark}" on-tap="onRemoveBookmarkTap_">
154 <iron-icon icon="cr:star"></iron-icon>
155 </button>
156 <button is="paper-icon-button-light" id="menu-button"
157 on-tap="onMenuButtonTap_" title="$i18n{moreActionsButton}">
158 <iron-icon icon="cr:more-vert"></iron-icon>
159 </button>
160 </div>
161 <template is="dom-if" if="[[hasTimeGap]]">
162 <div id="time-gap-separator"></div>
163 </template>
164 </div> 166 </div>
165 </template> 167 </template>
166 <script src="chrome://history/history_item.js"></script> 168 <script src="chrome://history/history_item.js"></script>
167 </dom-module> 169 </dom-module>
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/grouped_list.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