OLD | NEW |
---|---|
(Empty) | |
1 /* Copyright 2015 The Chromium Authors. All rights reserved. | |
2 * Use of this source code is governed by a BSD-style license that can be | |
3 * found in the LICENSE file. */ | |
4 | |
5 body { | |
6 -webkit-user-select: none; | |
7 background: none transparent; | |
8 margin: 0; | |
9 overflow: hidden; | |
10 padding: 0; | |
11 } | |
12 | |
13 a { | |
14 display: block; | |
15 } | |
16 | |
17 a, | |
18 a:active, | |
19 a:hover, | |
20 a:visited { | |
21 color: inherit; | |
22 text-decoration: none; | |
23 } | |
24 | |
25 #most-visited { | |
26 -webkit-user-select: none; | |
27 margin: 0; | |
28 text-align: -webkit-center; | |
29 } | |
30 | |
31 #mv-tiles, | |
32 #mv-tiles-old { | |
33 -webkit-user-select: none; | |
34 font-size: 0; | |
35 height: calc(2 * 146px); | |
36 line-height: 146px; | |
37 margin: 0; | |
38 opacity: 0; | |
39 position: absolute; | |
40 text-align: left; | |
huangs
2015/03/11 19:14:57
Use text-align: -webkit-auto ? It should work for
fserb
2015/03/11 19:30:57
Done.
| |
41 transition: opacity 1s; | |
42 } | |
43 | |
44 html[dir=rtl] #mv-tiles, | |
45 html[dir=rtl] #mv-tiles-old { | |
46 text-align: right; | |
47 } | |
48 | |
49 .mv-tile, | |
50 .mv-empty-tile { | |
51 background: rgb(242,242,242); | |
52 border-color: transparent; | |
53 border-radius: 2px; | |
54 border-style: solid; | |
55 border-width: 1px; | |
56 color: #323232; | |
57 display: inline-block; | |
58 font-family: arial, sans-serif; | |
59 font-size: 12px; | |
60 height: calc(130px - 2px); | |
61 line-height: 100%; | |
62 margin-left: 8px; | |
63 margin-right: 8px; | |
64 opacity: 1.0; | |
65 outline: 0; | |
66 overflow: hidden; | |
67 position: relative; | |
68 vertical-align: top; | |
69 white-space: nowrap; | |
70 width: calc(156px - 2px); | |
71 } | |
72 | |
73 .mv-tile { | |
74 -webkit-transition-duration: 200ms; | |
75 -webkit-transition-property: -webkit-transform, border, | |
76 box-shadow, margin, opacity, width; | |
77 cursor: pointer; | |
78 } | |
79 | |
80 .mv-tile:focus { | |
81 -webkit-filter: brightness(75%); | |
82 } | |
83 | |
84 .mv-tile:hover:focus { | |
85 -webkit-filter: brightness(100%) !important; | |
86 } | |
87 | |
88 .mv-tile.blacklisted { | |
89 -webkit-transform: scale(0, 0); | |
90 border: none; | |
91 margin: 0; | |
92 width: 0; | |
93 } | |
94 | |
95 .mv-tile:hover { | |
96 box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 4px 8px 0 rgba(0,0,0,0.2); | |
97 } | |
98 | |
99 .mv-tile.mv-blacklist { | |
100 opacity: 0; | |
101 } | |
102 | |
103 .mv-tile.mv-blacklist { | |
104 -webkit-transform: scale(0, 0); | |
105 -webkit-transform-origin: 0 41px; | |
106 margin-left: 0; | |
107 margin-right: 0; | |
108 width: 0; | |
109 } | |
110 | |
111 .mv-title { | |
112 -webkit-mask-image: | |
113 linear-gradient(to right, black, black, 100px, transparent); | |
114 border: none; | |
115 bottom: auto; | |
116 height: 15px; | |
117 left: 31px; | |
118 line-height: 14px; | |
119 padding: 0; | |
120 position: absolute; | |
121 text-overflow: clip; | |
122 top: 8px; | |
123 width: calc(156px - 32px - 4px); | |
124 } | |
125 | |
126 @media (-webkit-min-device-pixel-ratio: 2) { | |
127 .mv-title { | |
128 top: 8px; | |
129 } | |
130 } | |
131 | |
132 html[dir!=rtl] .mv-title[style*='direction: rtl'] { | |
133 -webkit-mask-image: | |
134 linear-gradient(to left, black, black, 100px, transparent); | |
135 left: auto; | |
136 right: 8px; | |
137 text-align: right; | |
138 } | |
139 | |
140 html[dir=rtl] .mv-title { | |
141 left: 8px; | |
142 text-align: left; | |
143 } | |
144 | |
145 html[dir=rtl] .mv-title[style*='direction: rtl'] { | |
146 -webkit-mask-image: | |
147 linear-gradient(to left, black, black, 100px, transparent); | |
148 right: 31px; | |
149 text-align: right; | |
150 } | |
151 | |
152 .mv-thumb { | |
153 border: none; | |
154 border-radius: 0; | |
155 cursor: pointer; | |
156 display: block; | |
157 height: 90px; | |
158 left: 3px; | |
159 position: absolute; | |
160 top: 31px; | |
161 width: 148px; | |
162 } | |
163 | |
164 .mv-thumb img { | |
165 height: 94px; | |
166 width: 148px; | |
167 } | |
168 | |
169 .mv-thumb.failed-img { | |
170 background-color: #FFF; | |
171 height: 94px; | |
172 width: 148px; | |
173 } | |
174 | |
175 .mv-thumb.failed-img::after { | |
176 border: 8px solid #f2f2f2; | |
177 border-radius: 50%; | |
178 content: ''; | |
179 display: block; | |
180 height: 0; | |
181 margin: 39px 66px; | |
182 width: 0; | |
183 } | |
184 | |
185 .mv-x { | |
186 -webkit-transition: opacity 150ms; | |
187 background: linear-gradient(to left, rgb(242,242,242) 60%, transparent); | |
188 border: none; | |
189 cursor: pointer; | |
190 height: 30px; | |
191 opacity: 0; | |
192 position: absolute; | |
193 right: 0; | |
194 width: 40px; | |
195 } | |
196 | |
197 .mv-x::after { | |
198 -webkit-mask-image: -webkit-image-set( | |
199 url(chrome-search://local-ntp/images/close_3_mask.png) 1x, | |
200 url(chrome-search://local-ntp/images/close_3_mask.png@2x) 2x); | |
201 -webkit-mask-position: 12px 10px; | |
202 -webkit-mask-repeat: no-repeat; | |
203 -webkit-mask-size: 10px 10px; | |
204 background-color: rgba(90,90,90,0.7); | |
205 content: ''; | |
206 display: block; | |
207 height: 32px; | |
208 position: absolute; | |
209 right: 0; | |
210 width: 32px; | |
211 } | |
212 | |
213 html[dir=rtl] .mv-x { | |
214 background: linear-gradient(to right, rgb(242,242,242) 60%, transparent); | |
215 left: -1px; | |
216 right: auto; | |
217 } | |
218 | |
219 html[dir=rtl] .mv-x::after { | |
220 left: -1px; | |
221 right: auto; | |
222 } | |
223 | |
224 .mv-x:hover::after { | |
225 background-color: rgb(90,90,90); | |
226 } | |
227 | |
228 .mv-x:active::after { | |
229 background-color: rgb(66,133,244); | |
230 } | |
231 | |
232 .mv-tile:hover .mv-x { | |
233 -webkit-transition-delay: 500ms; | |
234 opacity: 1; | |
235 } | |
236 | |
237 .mv-favicon { | |
238 background-size: 16px; | |
239 height: 16px; | |
240 left: 7px; | |
241 margin: 0; | |
242 pointer-events: none; | |
243 position: absolute; | |
244 top: 7px; | |
245 width: 16px; | |
246 } | |
247 | |
248 html[dir=rtl] .mv-favicon { | |
249 right: 7px; | |
250 } | |
251 | |
252 .mv-favicon.failed-favicon { | |
253 background-image: -webkit-image-set( | |
254 url(chrome-search://local-ntp/images/ntp_default_favicon.png) 1x, | |
255 url(chrome-search://local-ntp/images/ntp_default_favicon.png@2x) 2x); | |
256 background-repeat: no-repeat; | |
257 background-size: 16px 16px; | |
258 } | |
259 | |
260 .mv-favicon.failed-favicon img { | |
261 display: none; | |
262 } | |
OLD | NEW |