summaryrefslogtreecommitdiffstats
path: root/toolkit/components/translations/content/translations.css
blob: ee3c0ba8eca06279f8aacaf704027854596747ea (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
/* 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 {
  /* Provide defaults for when this page is viewed in "toolkit". */
  background-color: var(--in-content-page-background, #fff);
  color: var(--in-content-page-color, #15141a);

  /* Provide backup values for some of the variables used in "browser" so that the styles
     look nice by default in "toolkit". */
  --AT-box-background: var(--in-content-box-background, #fff);
  --AT-box-border-color: var(--in-content-box-border-color, #9e9ea0);
  --AT-box-info-background: var(--in-content-box-info-background, #f0f0f4);

  /* Variables used in the page layout */
  --AT-page-margin: 20px;
  --AT-input-padding: 20px;
  /* This is somewhat arbitrary, but works well for the current design. If the computed
     header height changes, this will need to be adjusted. */
  --AT-header-height: 156px;
  --AT-input-height: calc(min(400px, calc(100vh - var(--AT-header-height))));
  --AT-select-arrow-inset: 5px;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  inset: 0;
  position: absolute;
  visibility: hidden;
  flex-direction: column;
}

.about-translations-header {
  display: flex;
}

.about-translations-header > * {
  flex: 1;
  display: flex;
  max-width: 50%;
}

.about-translations-header-start {
  justify-content: start;
}

.about-translations-header-end {
  justify-content: end;
}

/* Increase the selector specificity to override the base `select` styles. */
select.about-translations-select {
  position: relative;
  padding-inline: 10px 20px;
  padding-block: 0px;
  min-width: 50%;
  margin: 5px;
  background-position: right var(--AT-select-arrow-inset) center;
}

select.about-translations-select:dir(rtl) {
  background-position-x: left var(--AT-select-arrow-inset);
}

.about-translations-contents {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: calc(100% - var(--AT-page-margin) * 2);
  max-width: 1200px;
  background-color: var(--AT-box-background);
  border: 1px solid var(--AT-box-border-color);
  border-radius: 4px;
}

.about-translations-input {
  display: flex;
  width: 100%;
  border-top: 1px solid var(--AT-box-border-color);
}

.about-translations-input-start {
  border-inline-end: 1px solid var(--AT-box-border-color);
}

.about-translations-input > * {
  position: relative;
  width: 50%;
}

.about-translations-input-textarea {
  /* Override user's dragging of the textarea width. */
  width: 100% !important;
  height: var(--AT-input-height);
  box-sizing: border-box;
  margin: 0;
  padding: var(--AT-input-padding);
  border: 0;
}

.about-translations-input-results-blank {
  opacity: 0.7;
}

.about-translations-input-results {
  position: absolute;
  inset: 0;
  padding: var(--AT-input-padding);
  box-sizing: border-box;
  overflow-y: scroll;
}

.about-translations-info {
  display: none;
  padding: 10px;
  background-color: var(--AT-box-info-background);
  border-radius: 4px;
  margin-bottom: var(--AT-input-padding);
}

.about-translations-info-message {
  flex: 1;
  align-self: center;
}

.about-translations-info-icon {
  width: 16px;
  height: 16px;
  margin: 10px;
  background-image: url('chrome://global/skin/icons/info.svg');
  -moz-context-properties: fill;
  fill: currentColor;
}

@media (max-width: 700px) {
  :root {
    --AT-page-margin: 10px;
  }
  h1 {
    margin-top: 15px;
  }
  body {
    padding-bottom: var(--AT-page-margin);
  }
  .about-translations-input {
    flex-direction: column;
    flex: 1;
  }
  .about-translations-input-textarea,
  .about-translations-input {
    font-size: 16px;
  }
  .about-translations-input > * {
    width: 100%;
    flex: 1;
  }
  .about-translations-input-end {
    border-top: 1px solid var(--AT-box-border-color);
  }
  .about-translations-input-textarea {
    height: 100%;
  }
  .about-translations-contents {
    flex: 1;
  }
}