PluginProbe
Authorizer / 3.3.1
Authorizer v3.3.1
3.15.3 3.15.2 3.15.1 3.15.0 3.14.3 3.14.4 3.14.2 3.14.1 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.9.0 2.9.1 2.9.10 2.9.11 2.9.12 2.9.13 2.9.2 2.9.3 2.9.6 All 126 releases
authorizer / css / authorizer.scss

authorizer.scss in Authorizer 3.3.1, at css/authorizer.scss

586 lines 13.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 // Authorizer Settings (wp-admin) styles.
2 // Compiles to: authorizer.css via `sass css/authorizer.scss css/authorizer.css`.
3
4 // Import WordPress 5.7 admin colors.
5 // See: https://make.wordpress.org/core/2021/02/23/standardization-of-wp-admin-colors-in-wordpress-5-7/
6 @import 'wp-admin-colors';
7
8 // Target just the Dashboard > Authorizer, and Network Dashboard > Authorizer.
9 .toplevel_page_authorizer,
10 .settings_page_authorizer {
11 // Banner image (bottom corner; fade if not scrolled to the bottom).
12 #wpwrap::before {
13 background: url('../images/authorizer-banner-400x300.png') no-repeat right bottom;
14 background-attachment: fixed;
15 content: "";
16 position: absolute;
17 top: 0;
18 left: 0;
19 width: 100%;
20 height: 100%;
21 opacity: 0;
22 z-index: -1;
23 transition: opacity 1s ease;
24 }
25 @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
26 #wpwrap::before {
27 background: url('../images/authorizer-banner-800x600.png') no-repeat right bottom;
28 background-size: 400px 300px;
29 }
30 }
31 #wpwrap.not-faded::before {
32 opacity: 1;
33 }
34
35 // No bottom margins on user lists.
36 #list_auth_settings_access_users_pending,
37 #list_auth_settings_access_users_approved,
38 #list_auth_settings_access_users_blocked {
39 margin-bottom: 0;
40 }
41
42 // Demo CAS login button sizing.
43 .button.button-external {
44 padding: 3px 16px;
45 height: 40px;
46 }
47 .button-external .dashicons {
48 margin: 4px 4px 0 0;
49 font-size: 24px;
50 }
51 .button-external input[type=text]=text] {
52 width: 100px;
53 }
54 @media screen and (max-width: 782px) {
55 .button-external {
56 width: 280px;
57 height: 50px;
58 font-size: 16px;
59 }
60 .button-external .dashicons {
61 margin: 4px 16px 0 0;
62 font-size: 30px;
63 }
64 .button-external input[type=text]=text] {
65 width: 120px;
66 display: inline;
67 }
68 }
69
70 // LDAP connection test.
71 #ldap_test_user_spinner {
72 float: none;
73 }
74 #ldap_test_user_result {
75 font-family: monospace;
76 width: 100%;
77 opacity: 0.8;
78 color: black;
79 }
80
81 // Mobile screen sizing.
82 @media screen and (max-width: 782px) {
83 .animated_wrapper {
84 width: 100% !important;
85 }
86 th {
87 padding: 8px 0 0;
88 }
89 td {
90 padding: 8px 0px;
91 }
92 #auth_settings_google_clientid {
93 width: 100%;
94 }
95
96 // Make pager fit on one line.
97 .tablenav {
98 .tablenav-pages {
99 text-align: left;
100 }
101
102 .current-page {
103 width: auto;
104 display: inline;
105 }
106 }
107
108 // Make "Limit invalid login attempts" inputs inline so they read like a
109 // sentence.
110 #auth_settings_advanced_lockouts_attempts_1,
111 #auth_settings_advanced_lockouts_duration_1,
112 #auth_settings_advanced_lockouts_attempts_2,
113 #auth_settings_advanced_lockouts_duration_2,
114 #auth_settings_advanced_lockouts_reset_duration {
115 display: inline;
116 }
117
118 // Textarea heights should match text/select heights on mobile.
119 textarea {
120 padding: 3px 10px;
121 line-height: 2;
122 min-height: 40px;
123 }
124
125 // Make Bootstrap button group label vertically centered.
126 @media screen and (max-width: 782px) {
127 .button-add-user {
128 line-height: 37px;
129 }
130 }
131 }
132
133 // Expand/collapse option sections.
134 .form-table {
135 th,
136 td {
137 &.hide-animate {
138 padding: 0;
139 transition: padding 0.25s ease;
140 }
141
142 &.hide-no-animate {
143 padding: 0;
144 }
145 }
146 }
147
148 // Remove 14px padding above pending user list (alignment with left label).
149 #list_auth_settings_access_users_pending {
150 margin: 6px 0;
151 }
152
153 // Remove 14px padding above blocked user list (alignment with left label).
154 #list_auth_settings_access_users_blocked {
155 margin: 0;
156 }
157
158 // Fix background and sizing of public pages (toggle lists).
159 .ms-container {
160 .ms-selectable,
161 .ms-selection {
162 background: none;
163 }
164 .ms-list {
165 background: white;
166
167 }
168 }
169
170
171 // Flex layout for user lists (pending, approved, blocked).
172 #list_auth_settings_access_users_pending li,
173 #list_auth_settings_access_users_approved li,
174 #new_auth_settings_access_users_approved,
175 #list_auth_settings_access_users_blocked li,
176 #new_auth_settings_access_users_blocked {
177 display: flex;
178 justify-content: flex-start;
179
180 // Spacing between elements.
181 & > :not(:last-child) { margin-right: 4px; }
182
183 // Let email and role grow the most.
184 & > :nth-child(1) { flex-grow: 4; }
185 & > :nth-child(2) { flex-grow: 2; }
186 }
187 }
188
189
190 // Target just the Dashboard widget.
191 #auth_dashboard_widget {
192 // Style the settings icon in the meta box header.
193 .js-toggle-auth_settings_dashboard_widget_control {
194 display: inline-block;
195 .toggle-indicator:before {
196 content: "\f111";
197 display: inline-block;
198 font: normal 20px/1 dashicons;
199 }
200 }
201
202 // Disable fixed height in table nav (widget usually too narrow so search
203 // wraps to second line).
204 .tablenav {
205 height: auto;
206
207 // Fix offset current page input relative to pager buttons.
208 .current-page {
209 margin-top: -4px;
210 }
211 }
212
213 // Tighter flex layout for user lists (pending, approved, blocked).
214 #list_auth_settings_access_users_pending li,
215 #list_auth_settings_access_users_approved li,
216 #new_auth_settings_access_users_approved,
217 #list_auth_settings_access_users_blocked li,
218 #new_auth_settings_access_users_blocked {
219 display: flex;
220 justify-content: flex-start;
221 flex-wrap: wrap;
222 margin-bottom: 12px;
223
224 // Spacing between elements.
225 & > :not(:last-child) {
226 margin-right: 2px;
227 }
228
229 // Let email and role grow the most.
230 & > :nth-child(1) { flex-grow: 1; }
231
232 // Shrink role dropdown.
233 .auth-role { max-width: 140px; }
234
235 // Specifically shrink fields when near media breakpoints to prevent
236 // wrapping to a second line when it's "really close."
237 // Breakpoints:
238 // 1 column: < 800px
239 @media only screen and (max-width: 550px) and (min-width:0px) {
240 .auth-email { max-width: 140px; }
241 }
242 // 2 column: 800px - 1499px
243 @media only screen and (max-width: 900px) and (min-width:800px) {
244 .auth-email { max-width: 200px; }
245 .auth-role { max-width: 140px; }
246 }
247 // 3 column: 1500px - 1800px
248 @media only screen and (max-width: 1550px) and (min-width:1500px) {
249 .auth-email { max-width: 200px; }
250 .auth-role { max-width: 140px; }
251 }
252 // 4 column: > 1800px
253 @media only screen and (max-width: 1800px) and (min-width:1500px) {
254 }
255 }
256
257 // Use flexbox to keep everything on one line in approved list.
258 #list_auth_settings_access_users_pending li,
259 #list_auth_settings_access_users_approved li,
260 #new_auth_settings_access_users_approved {
261 flex-wrap: nowrap;
262 & > * { flex: 0 0 auto; }
263 & > :nth-child(1) { flex-shrink: 1; }
264 & > :nth-child(2) { flex-shrink: 2; }
265 & > :nth-child(3) { flex-shrink: 2; }
266 & > :nth-child(4) { flex-shrink: 2; }
267 & > :nth-child(5) { flex-shrink: 1; }
268 input, select { min-width: 0; }
269 }
270 }
271
272
273 // Target Dashboard > Authorizer, Network Dashboard > Authorizer, and Dashboard
274 // widget.
275 .toplevel_page_authorizer,
276 .settings_page_authorizer,
277 #auth_dashboard_widget {
278 // Dashicons in buttons.
279 .button.dashicons-before:before {
280 vertical-align: middle;
281 padding-right: 2px;
282 font-size: 16px;
283 }
284
285 // Room at the bottom for logo.
286 #wpbody-content {
287 padding-bottom: 240px;
288 }
289
290 // Hide Role dropdown on Blocked user list.
291 #list_auth_settings_access_users_blocked .auth-role,
292 #new_auth_settings_access_users_blocked .auth-role {
293 display: none;
294 }
295
296 // Colors for user lists.
297 #list_auth_settings_access_users_pending {
298 .auth-email {
299 background-color: $color-yellow-5;
300 border-color: $color-yellow-20;
301 }
302 }
303 #list_auth_settings_access_users_approved {
304 .auth-email {
305 background-color: $color-green-5;
306 border-color: $color-green-20;
307 }
308 }
309 #list_auth_settings_access_users_blocked {
310 .auth-email {
311 background-color: $color-red-5;
312 border-color: $color-red-20;
313 }
314 }
315
316 // Fade multisite users (not editable).
317 .auth-multisite-username,
318 .auth-multisite-email,
319 .auth-multisite-role,
320 .auth-multisite-usermeta,
321 .auth-multisite-date-added {
322 opacity: 0.5;
323 }
324
325 // Cap max size of date and meta (no need for them to grow large).
326 .auth-date-added,
327 .auth-usermeta {
328 max-width: 80px;
329 }
330
331 // Hidden element (maintains space).
332 .invisible {
333 visibility: hidden;
334 }
335
336 // Multisite overlays.
337 form table.form-table td {
338 position: relative;
339 }
340 .auth_multisite_override_overlay {
341 .overlay-note {
342 background: $color-white;
343 border: 1px solid $color-gray-30;
344 cursor: default;
345 margin: 11px 15em;
346 opacity: 0;
347 padding: 8px;
348 position: absolute;
349 top: 0;
350 left: 0;
351 -webkit-transition: opacity 0.1s ease-in-out;
352 -moz-transition: opacity 0.1s ease-in-out;
353 transition: opacity 0.1s ease-in-out;
354
355 a {
356 cursor: pointer;
357 }
358 }
359 &:hover .overlay-note { opacity: 1; }
360 }
361
362 // Bootstrap customizations (typically because of conflicts with WordPress styles)
363 .dropdown-menu > li {
364 margin-bottom: 0 !important;
365 }
366 .dropdown-menu > li > a {
367 text-decoration: none !important;
368 white-space: normal !important; // Allow text to wrap to multiple lines.
369 }
370 .dropdown-toggle {
371 border-bottom: 0;
372 }
373 .dropdown-toggle-split {
374 padding-right: .5625rem;
375 padding-left: .5625rem;
376
377 &::after {
378 margin-left: 0;
379 }
380 }
381
382 // Portions below from Bootstrap.
383 // http://getbootstrap.com/getting-started/#download
384 .sr-only {
385 border: 0;
386 clip: rect(0, 0, 0, 0);
387 height: 1px;
388 margin: -1px;
389 overflow: hidden;
390 padding: 0;
391 position: absolute;
392 width: 1px;
393 }
394
395 .caret {
396 border-left: 4px solid transparent;
397 border-right: 4px solid transparent;
398 border-top: 4px solid;
399 display: inline-block;
400 height: 0;
401 margin-left: 2px;
402 vertical-align: middle;
403 width: 0;
404 }
405 .dropdown {
406 position: relative;
407 }
408 .dropdown-toggle:focus {
409 outline: 0;
410 }
411 .dropdown-menu {
412 background-clip: padding-box;
413 background-color: #fff;
414 border: 1px solid #ccc;
415 border: 1px solid rgba(0, 0, 0, .15);
416 border-radius: 4px;
417 -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
418 box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
419 display: none;
420 float: left;
421 font-size: 14px;
422 right: 0;
423 list-style: none;
424 margin: 2px 0 0;
425 min-width: 160px;
426 padding: 5px 0;
427 position: absolute;
428 top: 100%;
429 z-index: 1000;
430 }
431 .dropdown-menu.pull-right {
432 left: auto;
433 right: 0;
434 }
435 .dropdown-menu .divider {
436 background-color: #e5e5e5;
437 height: 1px;
438 margin: 9px 0;
439 overflow: hidden;
440 }
441 .dropdown-menu > li > a {
442 clear: both;
443 color: #333;
444 display: block;
445 font-weight: normal;
446 line-height: 1.42857143;
447 padding: 3px 20px;
448 white-space: nowrap;
449 }
450 .dropdown-menu > li > a:hover,
451 .dropdown-menu > li > a:focus {
452 background-color: #f5f5f5;
453 color: #262626;
454 text-decoration: none;
455 }
456 .dropdown-menu > .active > a,
457 .dropdown-menu > .active > a:hover,
458 .dropdown-menu > .active > a:focus {
459 background-color: #428bca;
460 color: #fff;
461 outline: 0;
462 text-decoration: none;
463 }
464 .dropdown-menu > .disabled > a,
465 .dropdown-menu > .disabled > a:hover,
466 .dropdown-menu > .disabled > a:focus {
467 color: #999;
468 }
469 .dropdown-menu > .disabled > a:hover,
470 .dropdown-menu > .disabled > a:focus {
471 background-color: transparent;
472 background-image: none;
473 cursor: not-allowed;
474 filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
475 text-decoration: none;
476 }
477 .open > .dropdown-menu {
478 display: block;
479 }
480 .open > a {
481 outline: 0;
482 }
483
484 .btn-group,
485 .btn-group-vertical {
486 display: inline-flex;
487 position: relative;
488 vertical-align: middle;
489 }
490 .btn-group > .btn,
491 .btn-group-vertical > .btn {
492 flex: 0 1 auto;
493 position: relative;
494 }
495 .btn-group > .btn:hover,
496 .btn-group-vertical > .btn:hover,
497 .btn-group > .btn:focus,
498 .btn-group-vertical > .btn:focus,
499 .btn-group > .btn:active,
500 .btn-group-vertical > .btn:active,
501 .btn-group > .btn.active,
502 .btn-group-vertical > .btn.active {
503 z-index: 2;
504 }
505 .btn-group > .btn:focus,
506 .btn-group-vertical > .btn:focus {
507 outline: none;
508 }
509 .btn-group .btn + .btn,
510 .btn-group .btn + .btn-group,
511 .btn-group .btn-group + .btn,
512 .btn-group .btn-group + .btn-group {
513 margin-left: -1px;
514 }
515 .btn-toolbar {
516 margin-left: -5px;
517 }
518 .btn-toolbar .btn-group,
519 .btn-toolbar .input-group {
520 float: left;
521 }
522 .btn-toolbar > .btn,
523 .btn-toolbar > .btn-group,
524 .btn-toolbar > .input-group {
525 margin-left: 5px;
526 }
527 .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
528 border-radius: 0;
529 }
530 .btn-group > .btn:first-child {
531 margin-left: 0;
532 }
533 .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
534 border-bottom-right-radius: 0;
535 border-top-right-radius: 0;
536 }
537 .btn-group > .btn:last-child:not(:first-child),
538 .btn-group > .dropdown-toggle:not(:first-child) {
539 border-bottom-left-radius: 0;
540 border-top-left-radius: 0;
541 }
542 .btn-group > .btn-group {
543 float: left;
544 }
545 .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
546 border-radius: 0;
547 }
548 .btn-group > .btn-group:first-child > .btn:last-child,
549 .btn-group > .btn-group:first-child > .dropdown-toggle {
550 border-bottom-right-radius: 0;
551 border-top-right-radius: 0;
552 }
553 .btn-group > .btn-group:last-child > .btn:first-child {
554 border-bottom-left-radius: 0;
555 border-top-left-radius: 0;
556 }
557 .btn-group .dropdown-toggle:active,
558 .btn-group.open .dropdown-toggle {
559 outline: 0;
560 }
561 .btn-group > .btn + .dropdown-toggle {
562 padding-left: 8px;
563 padding-right: 8px;
564 }
565 .btn-group > .btn-lg + .dropdown-toggle {
566 padding-left: 12px;
567 padding-right: 12px;
568 }
569 .btn-group.open .dropdown-toggle {
570 -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
571 box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
572 }
573 .btn-group.open .dropdown-toggle.btn-link {
574 -webkit-box-shadow: none;
575 box-shadow: none;
576 }
577 .btn .caret {
578 margin-left: 0;
579 }
580 }
581
582 // Busy cursor for ajax calls.
583 html.busy, html.busy * {
584 cursor: wait !important;
585 }
586