summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/ntp4/tile_page.css
blob: 08ff22b2505a7ed9bc5eb1e8793f1ef48b46443e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file. */

.tile-page {
  -webkit-box-orient: vertical;
  display: -webkit-box;
  height: 100%;
  position: relative;
  width: 100%;
}

.tile-page-scrollbar {
  -webkit-box-sizing: border-box;
  margin: 0 4px;
  pointer-events: none;
  position: absolute;
  right: 0;
  width: 5px;
  z-index: 5;
}

.tile-page-content {
  -webkit-box-flex: 1;
  /* Don't apply clip mask to padding. */
  -webkit-mask-clip: content-box;
  /* TODO(estade): this mask is disabled for technical reasons. It negatively
   * impacts performance of page switching, also it causes problems with Mac
   * text: http://crbug.com/86955
  -webkit-mask-image: -webkit-linear-gradient(bottom, transparent, black 30px);
  */
  /* The following four properties are necessary so that the mask won't clip
   * the scrollbar. */
  box-sizing: border-box;
  overflow-y: scroll;
  /* Scrollbar width(13px) + balance right padding.  */
  padding-left: 93px;
  padding-right: 80px;
  /* This value is mirrored in TilePage.updateTopMargin_ */
  padding-top: 60px;
  position: relative;
  text-align: center;
  width: 100%;
}

.top-margin {
  /* The only reason height is set to 1px, rather than left at 0, is that
   * otherwise webkit collapses the top and bottom margins. */
  height: 1px;
}

.tile-grid {
  position: relative;
  width: 100%;
}

.tile {
  -webkit-print-color-adjust: exact;
  /* Don't offer the context menu on long-press. */
  -webkit-touch-callout: none;
  -webkit-user-drag: element;
  display: inline-block;
  position: absolute;
}

/* NOTE: Dopplegangers nest themselves inside of other tiles, so don't
 * accidentally double apply font-size to them. */
.tile:not(.doppleganger) {
  font-size: 1.2em;
}

/* Not real but not a doppleganger: show nothing. This state exists for a
 * webstore tile that's on the same page as a [+]. */
.tile:not(.real):not(.doppleganger) {
  display: none;
}

/* I don't know why this is necessary. -webkit-user-drag: element on .tile
 * should be enough. If we don't do this, we get 2 drag representations for
 * the image. */
.tile img {
  -webkit-user-drag: none;
}

.doppleganger {
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
}

.tile.dragging {
  opacity: 0;
}

.tile.drag-representation {
  -webkit-transition: opacity 200ms;
  pointer-events: none;
  position: fixed;
  z-index: 3;
}

.tile.drag-representation.placing > * {
  -webkit-transition: -webkit-transform 200ms;
}

/* When a drag finishes while we're not showing the page where the tile
 * belongs, the tile shrinks to a dot. */
.tile.drag-representation.dropped-on-other-page > * {
   -webkit-transform: scale(0) rotate(0);
}

.tile.drag-representation.deleting > * {
  -webkit-transform: scale(0) rotate(360deg);
  -webkit-transition: -webkit-transform 600ms;
}

.animating-tile-page .tile,
.tile.drag-representation.placing {
  -webkit-transition: left 200ms, right 200ms, top 200ms;
}

.hovering-on-trash {
  opacity: 0.6;
}

.animating-tile-page .top-margin {
  -webkit-transition: margin-bottom 200ms;
}

.animating-tile-page #notification-container {
  -webkit-transition: margin 200ms, opacity 200ms;
}

@-webkit-keyframes bounce {
  0% {
    -webkit-transform: scale(0, 0);
  }

  60% {
    -webkit-transform: scale(1.2, 1.2);
  }

  100% {
    -webkit-transform: scale(1, 1);
  }
}

.tile > .new-tile-contents {
  -webkit-animation: bounce 500ms ease-in-out;
}

@-webkit-keyframes blipout {
  0% {
    -webkit-transform: scale(1, 1);
  }

  60% {
    -webkit-animation-timing-function: ease-in;
    -webkit-transform: scale(1.3, 0.02);
    opacity: 1;
  }

  90% {
    -webkit-animation-timing-function: default;
    -webkit-transform: scale(0.3, 0.02);
    opacity: 0.7;
  }

  100% {
    -webkit-animation-timing-function: linear;
    -webkit-transform: scale(0.3, 0.02);
    opacity: 0;
  }
}

.tile > .removing-tile-contents {
  -webkit-animation: blipout 300ms;
  -webkit-animation-fill-mode: forwards;
  pointer-events: none;
}

.tile-page:not(.selected-card) * {
  -webkit-transition: none !important;
}

/** Scrollbars ****************************************************************/

.tile-page-content::-webkit-scrollbar {
  width: 13px;
}

.tile-page-content::-webkit-scrollbar-button {
  display: none;
}