Debian Codegraph @

browserpass-extension/src/popup/popup.less

raw
1 @import "colors-dark.less";
2 @import "colors-light.less";
3
4 @login-height: 53px;
5 @max-logins-height: @login-height * 7;
6 @login-part-padding: 6px;
7 @login-part-height: @login-height - 2 * @login-part-padding;
8
9 @font-face {
10 font-family: "Open Sans";
11 font-style: normal;
12 font-weight: 400;
13 src: local("Open Sans"), url("/fonts/OpenSans-Regular.ttf") format("truetype");
14 }
15
16 @font-face {
17 font-family: "Open Sans";
18 font-style: normal;
19 font-weight: 300;
20 src: local("Open Sans Light"), url("/fonts/OpenSans-Light.ttf") format("truetype");
21 }
22
23 @font-face {
24 font-family: "Source Code Pro";
25 font-style: normal;
26 font-weight: 400;
27 src: local("Source Code Pro"), url("/fonts/SourceCodePro-Regular.ttf") format("truetype");
28 }
29
30 html,
31 body {
32 font-family: "Open Sans";
33 font-size: 14px;
34 margin: 0;
35 padding: 0;
36 min-width: 260px;
37 overflow-x: hidden;
38 white-space: nowrap;
39 }
40
41 @media (min-resolution: 192dpi) {
42 html,
43 body {
44 font-weight: 300;
45 }
46 }
47
48 html::-webkit-scrollbar,
49 body::-webkit-scrollbar {
50 display: none;
51 }
52
53 body {
54 display: flex;
55 flex-direction: column;
56 }
57
58 .logins {
59 box-sizing: border-box;
60 display: flex;
61 flex-direction: column;
62 overflow-y: auto;
63 height: inherit;
64 max-height: @max-logins-height;
65 }
66
67 .badge {
68 display: flex;
69 align-items: center;
70 border-radius: 4px;
71 font-size: 12px;
72 margin-right: 8px;
73 padding: 1px 4px;
74 }
75
76 .details .header {
77 display: flex;
78 margin-bottom: 4px;
79 }
80
81 .part {
82 box-sizing: border-box;
83 display: flex;
84 flex-shrink: 0;
85 width: 100%;
86 }
87
88 .part:last-child {
89 border-bottom: none;
90 }
91
92 .part > .badge:first-child {
93 margin-left: 0;
94 }
95
96 .part.error {
97 white-space: normal;
98 padding: 7px;
99 }
100
101 .part.notice {
102 white-space: normal;
103 padding: 7px;
104 }
105
106 .part.details {
107 flex-direction: column;
108 padding: 5px 10px 10px;
109 & > .part {
110 display: flex;
111 margin-bottom: 11px;
112 &:last-child {
113 margin-bottom: 0;
114 }
115 &.snack {
116 border: 1px solid;
117 border-radius: 2px;
118 height: 36px;
119 padding: 4px;
120 .char {
121 white-space: pre;
122 }
123 & > .label {
124 border-radius: 2px 0 0 2px;
125 cursor: default;
126 display: flex;
127 flex-grow: 0;
128 font-weight: bold;
129 justify-content: flex-end;
130 margin: -5px 8px -5px -5px;
131 padding: 4px 8px 4px 4px;
132 width: 3.25em;
133 }
134 & > :not(.label) {
135 display: flex;
136 align-items: center;
137 font-family: Source Code Pro, monospace;
138 }
139 & > .copy {
140 cursor: pointer;
141 flex-grow: 0;
142 padding: 0 24px 0 0;
143 background-image: url("/popup/icon-copy.svg");
144 background-position: top 4px right 4px;
145 background-repeat: no-repeat;
146 background-size: 16px;
147 margin: 2px;
148 }
149
150 & > .progress-container {
151 z-index: 2;
152 position: absolute;
153 margin: 30px 0 -4px calc(3.25em + 7px);
154 height: 1px;
155 width: calc(100% - 6.5em + 12px);
156 & > .progress {
157 height: 100%;
158 margin: 0;
159 }
160 }
161 }
162 &.raw textarea {
163 border: 1px solid;
164 border-radius: 2px;
165 flex-grow: 1;
166 font-family: Source Code Pro, monospace;
167 min-height: 110px;
168 min-width: 340px;
169 outline: none;
170 padding: 10px;
171 white-space: pre;
172 }
173 & > * {
174 flex-grow: 1;
175 align-items: center;
176 }
177 }
178 }
179
180 .part.search {
181 padding: 6px 28px 6px 6px;
182 background-image: url("/popup/icon-search.svg");
183 background-position: top 6px right 6px;
184 background-repeat: no-repeat;
185 background-size: 18px;
186 }
187
188 .part.search > .hint {
189 line-height: 19px;
190 }
191
192 .part.search > .hint > .remove-hint {
193 background-image: url("/popup/icon-bs-delete.svg");
194 background-repeat: no-repeat;
195 background-size: contain;
196 cursor: pointer;
197 height: 12px;
198 margin: 3px 0 3px 4px;
199 width: 16px;
200 }
201
202 .part.search > input[type="text"] {
203 border: none;
204 outline: none;
205 width: 100%;
206 font-family: "Open Sans";
207 }
208
209 .part.search > input[type="text"]::placeholder {
210 opacity: 1;
211 }
212
213 .part.login > .name:hover,
214 .part.login > .name:focus,
215 .part.login > .action:hover,
216 .part.login > .action:focus,
217 .part.login:focus > .name {
218 outline: none;
219 }
220
221 .part.login {
222 display: flex;
223 align-items: center;
224 height: @login-height;
225
226 &.details-header {
227 height: calc(@login-height + 6px);
228 padding: 0 4px;
229 outline: none;
230 }
231
232 &:not(.details-header) {
233 cursor: pointer;
234 }
235
236 &:hover,
237 &:focus {
238 outline: none;
239 }
240
241 .name {
242 display: flex;
243 flex-direction: column;
244 width: 100%;
245 height: @login-part-height;
246 padding: @login-part-padding;
247
248 .line1 {
249 display: flex;
250 flex-direction: row;
251 font-size: 12px;
252
253 .recent {
254 background-image: url("/popup/icon-history.svg");
255 background-repeat: no-repeat;
256 background-size: contain;
257 margin-left: 8px;
258 width: 9.5px;
259 margin-top: 4px;
260 }
261 }
262
263 .line2 {
264 font-size: 18px;
265 margin-top: 2px;
266 }
267 }
268
269 .action {
270 background-position: center;
271 background-repeat: no-repeat;
272 background-size: 19px;
273 width: 30px;
274 height: @login-part-height;
275 padding: @login-part-padding;
276
277 &.copy-password {
278 background-image: url("/popup/icon-key.svg");
279 }
280
281 &.copy-user {
282 background-image: url("/popup/icon-user.svg");
283 }
284
285 &.details {
286 background-image: url("/popup/icon-details.svg");
287 }
288 }
289 }
290
291 .part.login em {
292 font-style: normal;
293 }
294
295 .updates {
296 padding: @login-part-padding;
297 }