summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/options/options_page.css
blob: a35f46013c68384d6c09f931c41c9d2ac3da90be (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
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
/* 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. */

body {
  position: relative;
}

#main-content {
  bottom: 0;
  display: -webkit-box;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

#mainview {
  -webkit-box-align: stretch;
  bottom: 0;
  left: 0;
  margin: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 1;
}

#mainview-content {
  min-height: 100%;
  position: relative;
}

#page-container {
  box-sizing: border-box;
  max-width: 888px;
  min-width: 600px;
}

body #searchBox {
  position: fixed;
  z-index: 4;
}

div.disabled {
  color: #999;
}

.settings-row {
  display: block;
  margin: 0.65em 0;
}

.hbox {
  -webkit-box-orient: horizontal;
  display: -webkit-box;
}

.vbox {
  -webkit-box-orient: vertical;
  display: -webkit-box;
}

.box-align-center {
  -webkit-box-align: center;
}

.stretch {
  -webkit-box-flex: 1;
}

.raw-button,
.raw-button:hover,
.raw-button:active {
  background-color: transparent;
  background-repeat: no-repeat;
  border: none;
  box-shadow: none;
  min-width: 0;
  padding: 1px 6px;
}

.bottom-strip {
  border-top: none;
  bottom: 0;
  padding: 12px;
  position: absolute;
  right: 0;
}

/* Omit top padding (currently only on #settings) whenever the search page is
 * showing.
 */
#searchPage:not([hidden]) + #settings {
  padding-top: 0;
}

.page list {
  /* Min height is a multiple of the list item height (32) */
  min-height: 192px;
}

.option {
  margin-top: 0;
}

.touch-slider {
  -webkit-appearance: slider-horizontal;
}

.settings-list,
.settings-list-empty {
  border: 1px solid #d9d9d9;
  border-radius: 2px;
}

.settings-list-empty {
  background-color: #f4f4f4;
  box-sizing: border-box;
  min-height: 125px;
  padding-left: 20px;
  padding-top: 20px;
}


/* Editable text field properties */
.editable-text-field > * {
  -webkit-box-align: center;
  -webkit-transition: 150ms background-color;
  border: none;
  box-sizing: border-box;
  display: -webkit-box;
  height: 20px;
  margin: 0;
}

.editable-text-field > .spacer {
  /* The above height rule should not apply to spacers. */
  height: 0;
}

.editable-text-field .editable-text {
  padding: 2px 3px;
}

.editable-text-field .static-text {
  height: 24px;
  overflow: hidden;
  padding: 3px 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editable-text-field:not([editable]) > [displaymode='edit'] {
  display: none;
}

.editable-text-field[editable] > [displaymode='static'] {
  display: none;
}

.editable-text-field[empty] > input[type='text'] {
  color: #ccc;
  font-style: italic;
}

.editable-text-field[disabled] {
  opacity: 0.6;
}

/* Editable List properties */
list > * {
  -webkit-box-align: center;
  -webkit-transition: 150ms background-color;
  border: none;
  border-radius: 0;  /* TODO(dbeam): Is this necessary? */
  box-sizing: border-box;
  display: -webkit-box;
  height: 32px;
  margin: 0;
}

list > .spacer {
  /* The above height rule should not apply to spacers. When redraw is called
     on the list they will be given an explicit element height but this ensures
     they have 0 height to begin with. */
  height: 0;
}

list:not([disabled]) > :hover {
  background-color: rgb(228, 236, 247);
}

/* TODO(stuartmorgan): Once this becomes the list style for other WebUI pages
 * these rules can be simplified (since they wont need to override other rules).
 */

list:not([has-element-focus]) > [selected],
list:not([has-element-focus]) > [lead][selected] {
  background-color: #d0d0d0;
  background-image: none;
}

list[has-element-focus] > [selected],
list[has-element-focus] > [lead][selected],
list:not([has-element-focus]) > [selected]:hover,
list:not([has-element-focus]) > [selected][lead]:hover {
  background-color: rgb(187, 206, 233);
  background-image: none;
}

.settings-list[has-element-focus] > [lead],
.settings-list[has-element-focus] > [lead][selected] {
  border-bottom: 1px solid rgb(120, 146, 180);
  border-top: 1px solid rgb(120, 146, 180);
}

.settings-list[has-element-focus] > [lead]:nth-child(2),
.settings-list[has-element-focus] > [lead][selected]:nth-child(2) {
  border-top: 1px solid transparent;
}

.settings-list[has-element-focus] > [lead]:nth-last-child(2),
.settings-list[has-element-focus] > [lead][selected]:nth-last-child(2) {
  border-bottom: 1px solid transparent;
}

.settings-list[disabled] > [lead][selected],
.settings-list[disabled]:focus > [lead][selected] {
  border: none;
}

list[disabled] {
  opacity: 0.6;
}

list > .heading {
  color: #666;
}

list > .heading:hover {
  background-color: transparent;
  border-color: transparent;
}

list .deletable-item {
  -webkit-box-align: center;
  outline: none;
}

list .deletable-item > :first-child {
  -webkit-box-align: center;
  -webkit-box-flex: 1;
  -webkit-padding-end: 5px;
  display: -webkit-box;
}

list .row-delete-button {
  -webkit-transition: 150ms opacity;
  background-color: transparent;
  /* TODO(stuartmorgan): Replace with real images once they are available. */
  background-image: -webkit-image-set(
      url(../../../../ui/resources/default_100_percent/close_2.png) 1x,
      url(../../../../ui/resources/default_200_percent/close_2.png) 2x);
  border: none;
  display: block;
  height: 16px;
  opacity: 1;
  width: 16px;
}

list > *:not(:hover):not([selected]):not([lead]) .row-delete-button,
list:not([has-element-focus]) > *:not(:hover):not([selected])
    .row-delete-button,
list[disabled] .row-delete-button,
list .row-delete-button[disabled] {
  opacity: 0;
  pointer-events: none;
}

/* HostedApp entries use the disabled closing button to display the App's
 * favicon, as an indicator that instead of deleting the permission here
 * the user has to remove the hosted app.*/
list div[role='listitem'][managedby='HostedApp'] .row-delete-button {
  opacity: 1;
}

list .row-delete-button:hover {
  background-image: -webkit-image-set(
      url(../../../../ui/resources/default_100_percent/close_2_hover.png) 1x,
      url(../../../../ui/resources/default_200_percent/close_2_hover.png) 2x);
}

list .row-delete-button:active {
  background-image: -webkit-image-set(
      url(../../../../ui/resources/default_100_percent/close_2_pressed.png)
          1x,
      url(../../../../ui/resources/default_200_percent/close_2_pressed.png)
          2x);
}

list .static-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

list[type='text'][inlineeditable] input {
  box-sizing: border-box;
  margin: 0;
  width: 100%;
}

list > :not([editing]) [displaymode='edit'] {
  display: none;
}

list > [editing] [displaymode='static'] {
  /* Don't use display:none or visibility:hidden because we need to keep an
   * element focusable.
   * We shrink only height.  We don't shrink width to avoid to change the size
   * of containing boxes.
   */
  border-bottom: 0 !important;
  border-top: 0 !important;
  height: 0 !important;
  margin-bottom: 0 !important;
  margin-top: 0 !important;
  overflow: hidden;
  pointer-events: none;
}

list > [editing] input:invalid {
  /* TODO(stuartmorgan): Replace with validity badge */
  background-color: pink;
}

.list-inline-button {
  -webkit-appearance: none;
  -webkit-transition: opacity 150ms;
  background: rgb(138, 170, 237);
  border: none;
  border-radius: 2px;
  color: white;
  font-weight: bold;
  opacity: 0.7;
}

.list-inline-button:hover {
  opacity: 1;
}

.option-name {
  -webkit-padding-end: 5px;
}

.favicon-cell {
  -webkit-padding-start: 20px;
  background-position: left;
  background-repeat: no-repeat;
  background-size: 16px;
}

input[type='url'].favicon-cell {
  -webkit-padding-start: 22px;
  background-position-x: 4px;
}

html[dir=rtl] input.favicon-cell,
input[dir=rtl].favicon-cell {
  background-position-x: -webkit-calc(100% - 4px);
}

list .favicon-cell {
  -webkit-margin-start: 7px;
  -webkit-padding-start: 26px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[dir=rtl] list .favicon-cell {
  background-position: right;
}

html[enable-background-mode=false] #background-mode-section {
 display: none;
}

/* UI Controls */

/* LIST */
.settings-list[has-element-focus] {
<if expr="not is_macosx">
  outline: 1px solid rgba(0, 128, 256, 0.5);
  outline-offset: -2px;
</if>
<if expr="is_macosx">
  /* This matches the native list outline on Mac */
  outline-color: rgb(117, 154, 217);
  outline-offset: -1px;
  outline-style: auto;
  outline-width: 5px;
</if>
}

.suboption {
  -webkit-margin-start: 23px;
}

list.autocomplete-suggestions {
  background-color: white;
  border: 1px solid #aaa;
  border-radius: 2px;
  min-height: 0;
  opacity: 0.9;
  position: fixed;
  z-index: 3;
}

list.autocomplete-suggestions > div {
  height: auto;
}

list.autocomplete-suggestions:not([has-element-focus]) > [selected],
list.autocomplete-suggestions:not([has-element-focus]) > [lead][selected] {
  background-color: rgb(187, 206, 233);
}

html:not(.focus-outline-visible)
:enabled:focus:-webkit-any(input[type='checkbox'], input[type='radio']) {
  /* Cancel border-color for :focus specified in widgets.css. */
  border-color: rgba(0, 0, 0, 0.25);
}

html:not([hasFlashPlugin]) .flash-plugin-area,
/* If the Flash plug-in supports the NPP_ClearSiteData API, we don't need to
 * show the link to the Flash storage settings manager:
 */
html[flashPluginSupportsClearSiteData] .flash-plugin-area,
html:not([flashPluginSupportsClearSiteData]) .clear-plugin-lso-data-enabled,
html[flashPluginSupportsClearSiteData] .clear-plugin-lso-data-disabled,
html:not([enablePepperFlashSettings]) .pepper-flash-settings {
  display: none;
}

.standalone-action-link {
  padding: 0;
}

:-webkit-any(.checkbox, .radio) label + a {
  display: inline-block;
  /* Matches padding of -webkit-any(.checkbox, .radio) */
  padding-bottom: 7px;
  vertical-align: bottom;
}