|
1 | | -@import url("./variables.css"); |
2 | | - |
3 | | -body { |
4 | | - direction: __MSG_@@bidi_dir__; |
5 | | -} |
6 | | - |
7 | | -/* https://design.firefox.com/photon/components/links.html */ |
8 | | -a { |
9 | | - color: var(--blue-60); |
10 | | - text-decoration: none; |
11 | | -} |
12 | | - |
13 | | -a:focus { |
14 | | - border-radius: 4px; |
15 | | - box-shadow: 0 0 0 2px var(--blue-50), 0 0 0 6px var(--blue-50-a30); |
16 | | -} |
17 | | - |
18 | | -a:hover, a:active { |
19 | | - text-decoration: underline; |
20 | | -} |
21 | | - |
22 | | -a:active { |
23 | | - color: var(--blue-70); |
24 | | -} |
25 | | - |
26 | | -/* external link symbol */ |
27 | | -/* currently disabled, because it is not clear what an external link is, in our case */ |
28 | | -/*a:not([class])[href*="//"]::after { |
29 | | - background-image: url(/common/img/open-in-new.svg); |
30 | | - background-repeat: no-repeat; |
31 | | - background-size: 16px 16px; |
32 | | - content: ""; |
33 | | - display: inline-block; |
34 | | - height: 16px; |
35 | | - margin: -.3rem .15rem 0 .25rem; |
36 | | - vertical-align: middle; |
37 | | - width: 16px; |
38 | | -}*/ |
39 | | - |
40 | | -.center-container { |
41 | | - display: flex; |
42 | | - flex-direction: column; |
43 | | - align-items: center; |
44 | | -} |
45 | | - |
46 | | -/* small classes in order to avoid inline CSS */ |
47 | | -.invisible { |
48 | | - display: none !important; |
49 | | -} |
50 | | - |
51 | | -.message-container { |
52 | | - position: relative; |
53 | | -} |
54 | | - |
55 | | -/* buttons https://design.firefox.com/photon/components/buttons.html */ |
56 | | -.micro-button { |
57 | | - min-height: 24px; |
58 | | - height: auto; |
59 | | - border-radius: 2px; |
60 | | - |
61 | | - padding-left: 8px; |
62 | | - padding-right: 8px; |
63 | | - |
64 | | - /* not documented, but looks ugly otherwise */ |
65 | | - padding-top: 2px; |
66 | | - padding-bottom: 2px; |
67 | | - |
68 | | - box-sizing: content-box; |
69 | | - |
70 | | - /* do not break over multiple lines */ |
71 | | - /* white-space: nowrap; */ |
72 | | - height: auto; /* currently, we rather prefer breaking until https://github.com/rugk/offline-qr-code/issues/12 is done */ |
73 | | -} |
74 | | - |
75 | | -/* use light color for dark backgrounds */ |
76 | | -.micro-button:hover.success, |
77 | | -.micro-button:active.success, |
78 | | -.micro-button:hover.warning, |
79 | | -.micro-button:active.warning, |
80 | | -.micro-button:hover.error, |
81 | | -.micro-button:active.error { |
82 | | - color: var(--white-100); |
83 | | -} |
84 | | - |
85 | | -.micro-button.info { |
86 | | - background-color: var(--grey-90-a10); |
87 | | -} |
88 | | -.micro-button:hover.info { |
89 | | - background-color: var(--grey-90-a20); |
90 | | -} |
91 | | -.micro-button:active.info { |
92 | | - background-color: var(--grey-90-a30); |
93 | | -} |
94 | | - |
95 | | -.micro-button.success { |
96 | | - background-color: var(--green-60); |
97 | | -} |
98 | | -.micro-button:hover.success { |
99 | | - background-color: var(--green-70); |
100 | | -} |
101 | | -.micro-button:active.success { |
102 | | - background-color: var(--green-80); |
103 | | -} |
104 | | - |
105 | | -.micro-button.warning { |
106 | | - background-color: var(--yellow-60); |
107 | | -} |
108 | | -.micro-button:hover.warning { |
109 | | - background-color: var(--yellow-70); |
110 | | -} |
111 | | -.micro-button:active.warning { |
112 | | - background-color: var(--yellow-80); |
113 | | -} |
114 | | - |
115 | | -.micro-button.error { |
116 | | - background-color: var(--red-70); |
117 | | - color: var(--white-100); |
118 | | -} |
119 | | -.micro-button:hover.error { |
120 | | - background-color: var(--red-80); |
121 | | -} |
122 | | -.micro-button:active.error { |
123 | | - background-color: var(--red-90); |
124 | | -} |
125 | | - |
126 | | -.micro-button:focus { |
127 | | - box-shadow: 0 0 0 1px #0a84ff inset, 0 0 0 1px #0a84ff, 0 0 0 4px rgba(10, 132, 255, 0.3) |
128 | | -} |
129 | | - |
130 | | -/* message box */ |
131 | | -/* follows https://design.firefox.com/photon/components/message-bars.html */ |
132 | | -.message-box { |
133 | | - padding: 4px; |
134 | | - |
135 | | - border-radius: 4px; |
136 | | - |
137 | | - /* use whole width */ |
138 | | - width: calc(100% - 8px); |
139 | | - min-height: 32px; |
140 | | - |
141 | | - /* make errors selectable, so users can copy them */ |
142 | | - -moz-user-select: text; |
143 | | - cursor: text; |
144 | | - |
145 | | - /* multiline */ |
146 | | - hypens: auto; |
147 | | - overflow-wrap: break-word; |
148 | | - |
149 | | - /* center-vertically */ |
150 | | - display: flex; |
151 | | - align-items: center; |
152 | | - |
153 | | - z-index: 2; |
154 | | - |
155 | | - /* fade-in transition */ |
156 | | - /* follow https://design.firefox.com/photon/motion/duration-and-easing.html */ |
157 | | - opacity: 1; |
158 | | - max-height: 100px; |
159 | | - |
160 | | - transition: opacity 150ms cubic-bezier(.07,.95,0,1), |
161 | | - max-height 200ms cubic-bezier(.07,.95,0,1); |
162 | | -} |
163 | | -.message-box.fade-hide { |
164 | | - max-height: 0px; |
165 | | - opacity: 0; |
166 | | - min-height: 0px; |
167 | | -} |
168 | | - |
169 | | -/* add margin when messages are stacked on each other */ |
170 | | -.message-box:not(.invisible) ~ .message-box:not(.invisible) { |
171 | | - margin-top: 8px; |
172 | | -} |
173 | | - |
174 | | -.error { |
175 | | - color: var(--white-100); |
176 | | - background-color: var(--red-60); |
177 | | -} |
178 | | - |
179 | | -.info { |
180 | | - color: var(--grey-90); |
181 | | - background-color: var(--grey-20); |
182 | | -} |
183 | | - |
184 | | -.success { |
185 | | - color: var(--green-90); |
186 | | - background-color: var(--green-50); |
187 | | -} |
188 | | - |
189 | | -.warning { |
190 | | - color: var(--yellow-90); |
191 | | - background-color: var(--yellow-50); |
192 | | -} |
193 | | - |
194 | | -/* message box action button */ |
195 | | -.message-action-button { |
196 | | - margin-left: 8px; |
197 | | - |
198 | | - /* center vertially */ |
199 | | - margin-top: auto; |
200 | | - margin-bottom: auto; |
201 | | - |
202 | | - /* some minimum margin to dismiss button or similar */ |
203 | | - margin-right: 4px; |
204 | | - |
205 | | - border: 0; |
206 | | - color: var(--grey-90); |
207 | | - |
208 | | - cursor: pointer; |
209 | | -} |
210 | | - |
211 | | -/* icons for the message boxes */ |
212 | | -.message-box::before { |
213 | | - display: inline-block; |
214 | | - |
215 | | - /* fixed size */ |
216 | | - background-size: 16px 16px; |
217 | | - width: 16px; |
218 | | - height: 16px; |
219 | | - min-width: 16px; |
220 | | - min-height: 16px; |
221 | | - |
222 | | - content: ""; |
223 | | - margin: 4px; |
224 | | -} |
225 | | - |
226 | | -.error::before { |
227 | | - background-image: url('/common/img/error-white.svg'); |
228 | | -} |
229 | | -.info::before { |
230 | | - background-image: url('/common/img/info-dark.svg'); |
231 | | -} |
232 | | -.success::before { |
233 | | - background-image: url('/common/img/check.svg'); |
234 | | -} |
235 | | -.warning::before { |
236 | | - background-image: url('/common/img/warning-dark.svg'); |
237 | | -} |
238 | | - |
239 | | -.icon-dismiss { |
240 | | - box-sizing: content-box; |
241 | | - padding: 2px; |
242 | | - |
243 | | - width: 24px; |
244 | | - height: 24px; |
245 | | - |
246 | | - margin-left: auto; |
247 | | - cursor: pointer; |
248 | | - |
249 | | - /* some animation on hover */ |
250 | | - transition: background-color 150ms cubic-bezier(.07,.95,0,1); |
251 | | -} |
252 | | -.icon-dismiss:hover { |
253 | | - background-color: var(--grey-90-a10); |
254 | | - border-radius: 2px; |
255 | | -} |
256 | | -.icon-dismiss:active { |
257 | | - background-color: var(--grey-90-a20); |
258 | | - border-radius: 2px; |
259 | | -} |
260 | | -.icon-dismiss:focus { |
261 | | - box-shadow: 0 0 0 1px var(--blue-50) inset, 0 0 0 1px var(--blue-50), 0 0 0 4px var(--blue-50-a30); |
262 | | - border-radius: 2px; |
263 | | -} |
| 1 | +@import url("./modules/CommonCss/common.css"); |
0 commit comments