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

Side by Side Diff: chrome/browser/resources/ntp4/most_visited_page.css

Issue 7342017: ntp4: Most Visited appearance refresh (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cursor Created 9 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 | Annotate | Revision Log
OLDNEW
1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 5
6 .most-visited { 6 .most-visited {
7 position: absolute; 7 position: absolute;
8 } 8 }
9 9
10 .most-visited { 10 .most-visited {
11 display: -webkit-box; 11 display: -webkit-box;
12 position: absolute; 12 position: absolute;
13 text-decoration: none; 13 text-decoration: none;
14 -webkit-box-orient: vertical; 14 -webkit-box-orient: vertical;
15 } 15 }
16 16
17 .most-visited:focus { 17 .most-visited:focus {
18 outline: none; 18 outline: none;
19 } 19 }
20 20
21 .edit-mode-border {
22 display: -webkit-box;
23 -webkit-box-orient: vertical;
24 }
25
26 .fills-parent { 21 .fills-parent {
27 bottom: 0; 22 bottom: 0;
28 display: -webkit-box; 23 display: -webkit-box;
29 left: 0; 24 left: 0;
30 position: absolute; 25 position: absolute;
31 right: 0; 26 right: 0;
32 top: 0; 27 top: 0;
33 } 28 }
34 29
35 /* filler mode: hide everything except the thumbnail --- leave a grey rectangle 30 /* filler mode: hide everything except the thumbnail --- leave a grey rectangle
36 * in its place. */ 31 * in its place. */
37 .filler * { 32 .filler * {
38 visibility: hidden; 33 visibility: hidden;
39 } 34 }
40 35
41 .filler { 36 .filler {
42 pointer-events: none; 37 pointer-events: none;
43 } 38 }
44 39
45 /* The point of edit-bar-wrapper is to clip the edit bar. Otherwise it can show 40 .most-visited .close-button {
46 * through from behind the thumbnail (some themes have a partially transparent 41 opacity: 0;
47 * thumbnail border color). */ 42 position: absolute;
48 .edit-bar-wrapper { 43 right: 0;
49 height: 23px; 44 top: 0;
50 overflow: hidden; 45 z-index: 5;
51 width: 100%; 46 -webkit-transition: opacity 0.15s;
52 } 47 }
53 48
54 /* The edit bar appears on hover. */ 49 .most-visited:hover .close-button,
55 .edit-bar { 50 .most-visited:focus .close-button {
56 border-top-left-radius: 5px; 51 opacity: 1;
57 border-top-right-radius: 5px; 52 -webkit-transition-delay: 0.5s;
58 box-sizing: border-box;
59 cursor: move;
60 display: -webkit-box;
61 font-size: 100%;
62 height: 100%;
63 line-height: 20px;
64 padding: 3px;
65 padding-bottom: 0;
66 position: relative;
67 top: 23px;
68 width: 100%;
69 -webkit-box-align: stretch;
70 -webkit-box-orient: horizontal;
71 -webkit-transition: top .15s;
72 }
73
74 .most-visited:focus .edit-bar,
75 .most-visited:hover .edit-bar {
76 top: 0;
77 }
78
79 .most-visited:hover .edit-bar {
80 /* Delay the appearance of the edit bar on hover. */
81 -webkit-transition-delay: .5s;
82 }
83
84 .edit-bar > * {
85 display: block;
86 position: relative;
87 }
88
89 .edit-bar > .spacer {
90 -webkit-box-flex: 1;
91 }
92
93 .edit-bar > .pin,
94 .edit-bar > .remove {
95 width: 16px;
96 height: 16px;
97 cursor: pointer;
98 background-image: no-repeat 50% 50%;
99 }
100
101 .edit-bar > .pin {
102 background-image: url('../ntp/ntp_pin_off.png');
103 }
104
105 .edit-bar > .pin:hover {
106 background-image: url('../ntp/ntp_pin_off_h.png');
107 }
108
109 .edit-bar > .pin:active {
110 background-image: url('../ntp/ntp_pin_off_p.png');
111 }
112
113 .pinned .edit-bar > .pin {
114 background-image: url('../ntp/ntp_pin_on.png');
115 }
116
117 .pinned .edit-bar > .pin:hover {
118 background-image: url('../ntp/ntp_pin_on_h.png');
119 }
120
121 .pinned .edit-bar > .pin:active {
122 background-image: url('../ntp/ntp_pin_on_p.png');
123 }
124
125 .edit-bar > .remove {
126 background-image: url('../ntp/ntp_close.png');
127 }
128
129 .edit-bar > .remove:hover {
130 background-image: url('../ntp/ntp_close_h.png');
131 }
132
133 .edit-bar > .remove:active {
134 background-image: url('../ntp/ntp_close_p.png');
135 } 53 }
136 54
137 .most-visited .favicon { 55 .most-visited .favicon {
138 background: no-repeat 5px 50%; 56 background: no-repeat 5px 50%;
139 background-size: 32px; 57 background-size: 32px;
140 bottom: 7px; 58 bottom: 7px;
141 box-sizing: border-box; 59 box-sizing: border-box;
142 display: block; 60 display: block;
143 height: 32px; 61 height: 32px;
144 position: absolute; 62 position: absolute;
(...skipping 20 matching lines...) Expand all
165 text-align: center; 83 text-align: center;
166 text-overflow: ellipsis; 84 text-overflow: ellipsis;
167 white-space: nowrap; 85 white-space: nowrap;
168 } 86 }
169 87
170 .thumbnail { 88 .thumbnail {
171 background: no-repeat; 89 background: no-repeat;
172 /* The extra 2% hides the scrollbar in the screenshot. */ 90 /* The extra 2% hides the scrollbar in the screenshot. */
173 background-size: 102%; 91 background-size: 102%;
174 border-radius: 5px; 92 border-radius: 5px;
93 -webkit-transition: opacity 0.15s;
175 } 94 }
176 95
177 .filler .thumbnail { 96 .filler .thumbnail {
178 /* TODO(estade): there seems to be a webkit bug where this border is not 97 /* TODO(estade): there seems to be a webkit bug where this border is not
179 * always removed when it should be. Investigate. */ 98 * always removed when it should be. Investigate. */
180 border: 1px solid; 99 border: 1px solid;
181 visibility: visible; 100 visibility: visible;
182 } 101 }
183 102
184 .thumbnail-shield { 103 .thumbnail-shield {
185 border-radius: 5px; 104 border-radius: 5px;
186 -webkit-mask-box-image: -webkit-linear-gradient( 105 background: -webkit-linear-gradient(rgba(255, 255, 255, 0),
187 rgba(0, 0, 0, 0), rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .9)); 106 rgba(255, 255, 255, 0) 50%,
107 rgba(255, 255, 255, 0.9));
108 }
109
110 .most-visited:hover .thumbnail {
111 opacity: 0.95;
112 }
113
114 .most-visited:active .thumbnail {
115 opacity: 0.9;
116 }
117
118 .most-visited:hover .thumbnail-shield,
119 .most-visited:active .thumbnail-shield {
120 background: -webkit-linear-gradient(rgba(255, 255, 255, 0),
121 rgba(255, 255, 255, 0) 80%,
122 rgba(255, 255, 255, 0.9));
123 }
124
125 .most-visited:active .thumbnail-shield {
126 -webkit-box-shadow: inset 0 1px 10px rgba(0, 0, 0, 0.2);
188 } 127 }
189 128
190 .thumbnail-wrapper { 129 .thumbnail-wrapper {
191 border: 1px solid transparent; 130 border: 1px solid transparent;
192 border-radius: 5px; 131 border-radius: 5px;
193 display: block; 132 display: block;
194 position: relative; 133 position: relative;
195 z-index: 5; 134 z-index: 5;
196 -webkit-box-flex: 1; 135 -webkit-box-flex: 1;
197 -webkit-transition: background-color .15s, 136 -webkit-transition: background-color .15s;
198 border-top-left-radius 0, border-top-right-radius 0;
199 /* The border radiuses have 0 transition duration but .15s delay, meaning they
200 * will snap into place after .15s. */
201 -webkit-transition-delay: 0, .15s, .15s;
202 } 137 }
203 138
204 .filler .thumbnail-wrapper { 139 .filler .thumbnail-wrapper {
205 visibility: visible; 140 visibility: visible;
206 } 141 }
207
208 /* Filler tiles can't get focused, but focused tiles can become filler. */
209 .most-visited:focus:not(.filler) .thumbnail-wrapper,
210 .most-visited:hover .thumbnail-wrapper {
211 border-top-left-radius: 0;
212 border-top-right-radius: 0;
213 }
214
215 .most-visited:hover .thumbnail-wrapper {
216 /* Make the corner radius transitions match the edit bar's slide. */
217 -webkit-transition-delay: 0, .5s, .5s;
218 }
219
220 .most-visited:focus .thumbnail-wrapper {
221 /* In the focus case, the transition is not delayed. */
222 -webkit-transition-delay: 0, 0, 0;
223 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/ntp4/most_visited_page.js » ('j') | chrome/browser/resources/ntp4/most_visited_page.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698