summaryrefslogtreecommitdiffstats
path: root/toolkit/components/aboutconfig/content/aboutconfig.css
blob: b1ffe12a86fcd9df40f4978ffca2d8a277fc12b5 (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
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

:root {
  --prefs-table-border-width: 1px;
  --prefs-table-border: var(--prefs-table-border-width) solid var(--in-content-box-border-color);
}

.hidden {
  display: none;
}

.table-shown > #show-all,
.table-shown > .config-background-wrapper {
  display: none;
}

.config-background {
  background: url("chrome://global/content/aboutconfig/background.svg") no-repeat;
  height: 182px;
  margin: 32px auto;
  width: 235px;
}

.config-help-text {
  text-align: center;
}

.title {
  background-image: url("chrome://global/skin/icons/warning.svg");
  fill: #fcd100;
}

#toolbar {
  position: sticky;
  top: 0;
  z-index: 1;
  box-sizing: border-box;
  width: 100%;
  background-color: var(--in-content-page-background);
  padding: 10px;
  padding-bottom: 0;
  min-width: 644px;
  display: flex;
}

.checkbox-container {
  /* Center align and get rid of whitespace. */
  display: inline-flex;
  align-items: center;
  margin-inline-start: 1ch;
}

#about-config-search {
  -moz-context-properties: fill, fill-opacity;
  fill: currentColor;
  box-sizing: border-box;
  flex-grow: 1;
  background-image: url("chrome://global/skin/icons/search-glass.svg");
  background-repeat: no-repeat;
  background-position: 8px center;
  background-size: 16px;
  /* Set horizontal margin to 0 to ensure alignment with table. */
  margin-inline: 0;
  text-align: match-parent;
  /* All prefs must be left-to-right. */
  direction: ltr;
}

@media not (prefers-contrast) {
  #about-config-search {
    fill-opacity: 0.4;
  }
}

#about-config-search:placeholder-shown {
  /* Display the placeholder in its natural directionality,
   * even if the user changes the text direction manually
   * (e.g. via RightCtrl+Shift). */
  direction: inherit;
}

:root:dir(ltr) #about-config-search {
  /* Be explicit about padding direction since
   * `about-config-search` is forced to be LTR. */
  padding-left: 32px;
}

:root:dir(rtl) #about-config-search {
  background-position-x: right 8px;
  padding-right: 32px;
}

#show-all {
  display: block;
  margin: 10px auto;
}

#prefs {
  background-color: var(--in-content-box-background);
  color: var(--in-content-text-color);
  margin: 10px;
  table-layout: fixed;
  width: calc(100% - 20px);
  min-width: 644px;
  /* To stay consistent with about:preferences (664px - 20px margin). */
  border: var(--prefs-table-border);
  border-radius: 4px;
  border-spacing: 0;
}

#prefs > tr.odd {
  background-color: var(--in-content-box-background-odd);
}

#prefs > tr:hover {
  background-color: var(--in-content-item-hover);
  color: var(--in-content-item-hover-text);
}

#prefs > tr.has-user-value {
  font-weight: bold;
}

#prefs > tr.locked {
  opacity: 0.4;
  background-image: url("chrome://global/skin/icons/security.svg");
  background-repeat: no-repeat;
  background-position: 9px center;
  background-size: 16px 16px;
  -moz-context-properties: fill;
  fill: currentColor;
}

#prefs > tr.locked:dir(rtl) {
  background-position-x: right 9px;
}

#prefs > tr > td,
#prefs > tr > th {
  padding: 4px;
  font-weight: inherit;
}

#prefs > tr > th {
  direction: ltr;
  text-align: match-parent;
}

#prefs > tr:dir(ltr) > th {
  /* Be explicit about padding direction since `th` is forced to be LTR. */
  padding-left: 30px;
}

#prefs > tr:dir(rtl) > th {
  padding-right: 30px;
}

#prefs > tr.deleted > th > span {
  font-weight: bold;
  color: var(--text-color-deemphasized);
}

#prefs > tr > td.cell-edit,
#prefs > tr > td.cell-reset {
  width: 40px;
  padding: 0;
}

.cell-value {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: break-all;
}

tr:not(.deleted) > .cell-value {
  /* Always display the text in the value cell using left-to-right rules, but
     align it according to the page direction. This doesn't apply to the radio
     buttons shown for deleted preferences. */
  direction: ltr;
  text-align: match-parent;
}

:root:dir(ltr) tr:not(.deleted) > .cell-value > #form-edit {
  /* Make the text in the form stay in the same place as before editing the pref. */
  margin-left: -8px;
}

:root:dir(rtl) tr:not(.deleted) > .cell-value > #form-edit {
  margin-right: -8px;
}

#form-edit > label {
  /* Make the radiobutton's text wrap to a new line along with
     the radiobutton itself, when space is constrained. */
  display: inline-block;
  margin-inline-end: 30px;
}

#form-edit > label:last-of-type {
  margin-inline-end: 0;
}

#form-edit > label > :is(input[type="radio"], span) {
  vertical-align: middle;
}

td.cell-value > form > input[type="text"],
td.cell-value > form > input[type="number"] {
  appearance: textfield;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  /* Align the text inside the input field in the same way as the table cell,
     for both the left-to-right and right-to-left directions. */
  text-align: match-parent;
}

.button-add,
.button-save,
.button-edit,
.button-toggle,
.button-delete,
.button-reset {
  -moz-context-properties: fill;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 16px;
  fill: currentColor;
  min-width: auto;
  width: 32px;
}

.button-add {
  background-image: url("chrome://global/skin/icons/plus.svg");
}

.button-save {
  background-image: url("chrome://global/skin/icons/check.svg");
}

.button-edit {
  background-image: url("chrome://global/skin/icons/edit.svg");
}

.button-toggle {
  background-image: url("chrome://global/content/aboutconfig/toggle.svg");
}

.button-delete {
  background-image: url("chrome://global/skin/icons/delete.svg");
}

.button-reset {
  background-image: url("chrome://global/skin/icons/undo.svg");
}

.button-reset:dir(rtl) {
  transform: scaleX(-1);
}

/* The ::before creates a blank space between the last visible pref and the add row. */
#prefs[has-visible-prefs] > .add > th::before,
#prefs[has-visible-prefs] > .add > td::before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  /* Make it wider by the border width so the border-inline is hidden. */
  inset-inline: calc(var(--prefs-table-border-width) * -1);
  height: 12px;
  background-color: var(--in-content-page-background);
  /* This is visually the top border on the add row. */
  border-bottom: var(--prefs-table-border);
}

#prefs[has-visible-prefs] > .add > th,
#prefs[has-visible-prefs] > .add > td {
  /* This is the border underneath the last existing pref row. */
  border-top: var(--prefs-table-border);
  padding-top: 14px;
  position: relative;
}

@media (prefers-contrast) {
  #prefs > tr.deleted:hover > th > span {
    color: inherit;
  }
}