summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/ntp4/incognito_tab.css
blob: d0ae5fb0c1d41ce193546df5bbe9218a5afb193b (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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
/* Copyright 2017 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. */

body {
  -webkit-font-smoothing: antialiased;
  font-size: 100%;
  margin: 0;
}

/** Typography -------------------------------------------------------------- */

.content {
  /* This is identical to the default background color. It's necessary to set it
     for the case when a theme with a background image is installed. */
  background-color: rgb(50, 54, 57);
  color: rgb(189, 193, 198);
  font-size: calc(100% - 2px);
  line-height: calc(100% + 6px);
  min-width: 240px;
}

h1 {
  color: rgb(218, 220, 224);
  font-size: calc(100% + 8px);
  font-weight: 400;
  line-height: calc(100% + 8px);
}

em {
  color: white;
  font-style: normal;
}

.learn-more-button {
  color: rgb(138, 180, 248);
  text-decoration: none;
}

/* Small font on small screens. */
@media (max-width: 240px),
       (max-height: 320px) {
  .content {
    font-size: calc(100% - 4px);
    line-height: calc(100% + 6px);
  }

  h1 {
    font-size: calc(100% + 4px);
    line-height: calc(100% + 4px);
  }
}

/** Icon -------------------------------------------------------------------- */

.icon {
  content: url(../../../../ui/webui/resources/images/incognito_splash.svg);
  height: 120px;
  width: 120px;
}

/* Medium-sized icon on medium-sized screens. */
@media (max-height: 480px),
       (max-width: 720px) {
  .icon {
    height: 72px;
    width: 72px;
  }
}

/* Very small icon on very small screens. */
@media (max-width: 720px) {
  @media (max-width: 240px),
         (max-height: 480px) {
    .icon {
      height: 48px;
      width: 48px;
    }
  }
}

/** The "Learn more" link --------------------------------------------------- */

/* By default, we only show the inline "Learn more" link. */
.content > .learn-more-button {
  display: none;
}

/* On narrow screens, we show the standalone "Learn more" link. */
@media (max-width: 720px) {
  #subtitle > .learn-more-button {
    display: none;
  }

  .content > .learn-more-button {
    display: block;
  }
}

/** Layout ------------------------------------------------------------------ */

/* Align the content, icon, and title to to the center. */
.content {
  margin-left: auto;
  margin-right: auto;
  max-width: 600px;
}

.icon {
  margin-left: auto;
  margin-right: auto;
}

h1 {
  text-align: center;
}

/* Align the two columns of bulletpoints next to each other. */
.bulletpoints {
  float: left;
}

html[dir=rtl] .bulletpoints {
  float: right;
}

.bulletpoints + .bulletpoints {
  clear: right;
}

html[dir=rtl] .bulletpoints + .bulletpoints {
  clear: left;
}

.clearer {
  clear: both;
}

/* On narrow screens, align everything to the left. */
@media (max-width: 720px) {
  .content {
    max-width: 600px !important;  /* must override the rule set by JS which
                                   * is only valid for width > 720px cases. */
    text-align: start;
  }

  .icon {
    -webkit-margin-start: 0;
  }

  h1 {
    text-align: start;
  }

  .bulletpoints + .bulletpoints,
  html[dir=rtl] .bulletpoints + .bulletpoints {
    clear: both;
  }
}

/** Paddings and margins ---------------------------------------------------- */

.bulletpoints ul {
  -webkit-padding-start: 16px;
  margin: 4px 0 0;
}

/* Margins of floating elements don't collapse. The margin for bulletpoints
 * will usually be provided by a neighboring element. */
.bulletpoints {
  margin: 0;
}

.bulletpoints + .bulletpoints {
  -webkit-margin-start: 40px;
}

.bulletpoints + .bulletpoints.too-wide {
  -webkit-margin-start: 0;
  margin-top: 1.5rem;
}

/* Wide screens. */
@media (min-width: 720px) {
  .icon,
  h1,
  #subtitle,
  .learn-more-button {
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
  }

  .content {
    margin-top: 40px;
    min-width: 240px;
    padding: 8px 48px 24px;
  }

  /* Snap the content box to the whole height on short screens. */
  @media (max-height: 480px) {
    html,
    body,
    .content {
      height: 100%;
    }

    .content {
      margin-bottom: 0;
      margin-top: 0;
      padding-bottom: 0;
      padding-top: 0;
    }

    .icon {
      margin-top: 0;
      padding-top: 32px;  /* Define the top offset through the icon's padding,
                           * otherwise the screen height would be 100% + 32px */
    }
  }

  /* Smaller vertical margins on very short screens. */
  @media (max-height: 320px) {
    h1,
    #subtitle,
    .learn-more-button {
      margin-bottom: 16px;
      margin-top: 16px;
    }

    .icon {
      margin-bottom: 16px;
    }
  }
}

/* Narrow screens */
@media (max-width: 720px) {
  .content {
    padding: 72px 32px;
    min-width: 176px;
  }

  .icon,
  h1,
  #subtitle,
  .learn-more-button {
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
  }

  /* The two columns of bulletpoints are moved under each other. */
  .bulletpoints + .bulletpoints {
    -webkit-margin-start: 0;
    margin-top: 1.5rem;
  }

  /* Smaller offsets on smaller screens. */
  @media (max-height: 600px) {
    .content {
      padding-top: 48px;
    }

    .icon,
    h1,
    #subtitle,
    .learn-more-button {
      margin-bottom: 1rem;
      margin-top: 1rem;
    }

    .bulletpoints + .bulletpoints {
      margin-top: 1rem;
    }
  }

  /* Small top offset on very small screens. */
  @media (max-height: 480px) {
    .content {
      padding-top: 32px;
    }
  }

  /* Undo the first and last elements margins. */
  .icon {
    margin-top: 0;
  }

  .learn-more-button {
    margin-bottom: 0;
  }
}

/* Very narrow screens. */
@media (max-width: 240px) {
  .content {
    min-width: 192px;
    padding-left: 24px;
    padding-right: 24px;
  }
}