PluginProbe
404 Solution / trunk
404 Solution vtrunk
4.3.5 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.2.0 4.1.19 4.1.18 4.1.17 4.1.16 4.1.15 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.1.7 4.1.6 4.1.5 4.1.4 4.1.3 trunk 2.30.0 All 109 releases
404-solution / includes / css / suggestions-loading.css

suggestions-loading.css in 404 Solution trunk, at includes/css/suggestions-loading.css

126 lines 4.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Front-end styles for the 404 suggestions block: the loading skeleton shown
3 * while suggestions are being computed, and the admin-only note rendered
4 * below the finished list.
5 *
6 * Kept as one stylesheet, under its original filename, because both live
7 * inside the same block and the async path already loads it before the AJAX
8 * response arrives -- an AJAX response cannot enqueue anything, so the admin
9 * note has to be styled by a sheet that is already on the page.
10 *
11 * This stylesheet is enqueued by the [abj404] shortcode on the user-facing
12 * (front-end) site. The plugin's admin theme variables (--abj404-*) defined
13 * in adminThemes.css are admin-only and are NOT available here, so the
14 * skeleton/text colors below must remain literal. The values are designed to
15 * read neutrally on any host theme (light + dark via prefers-color-scheme).
16 */
17
18 /* Container for loading state */
19 .abj404-loading {
20 list-style: none;
21 padding: 0;
22 margin: 0;
23 }
24
25 /* Individual skeleton item */
26 .abj404-skeleton {
27 /* allow-hardcoded-color: frontend shortcode CSS; admin theme vars are not loaded on the user site, and skeleton shimmer must read on any host theme. */
28 background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
29 background-size: 200% 100%;
30 animation: abj404-shimmer 1.5s infinite;
31 height: 20px;
32 margin: 10px 0;
33 border-radius: 4px;
34 list-style: none;
35 }
36
37 /* Vary widths for more natural look */
38 .abj404-skeleton:nth-child(1) { width: 85%; }
39 .abj404-skeleton:nth-child(2) { width: 70%; }
40 .abj404-skeleton:nth-child(3) { width: 90%; }
41 .abj404-skeleton:nth-child(4) { width: 75%; }
42 .abj404-skeleton:nth-child(5) { width: 80%; }
43 .abj404-skeleton:nth-child(n+6) { width: 78%; }
44
45 /* Shimmer animation */
46 @keyframes abj404-shimmer {
47 0% {
48 background-position: -200% 0;
49 }
50 100% {
51 background-position: 200% 0;
52 }
53 }
54
55 /* Loading text message */
56 .abj404-loading-text {
57 /* allow-hardcoded-color: frontend shortcode CSS, theme vars unavailable; mid-gray reads on light host themes. */
58 color: #666;
59 font-style: italic;
60 margin: 5px 0 10px;
61 font-size: 0.95em;
62 }
63
64 /* No suggestions fallback message */
65 .abj404-no-suggestions {
66 /* allow-hardcoded-color: frontend shortcode CSS, theme vars unavailable; mid-gray reads on light host themes. */
67 color: #666;
68 font-style: italic;
69 list-style: none;
70 padding: 10px 0;
71 }
72
73 /* Dark mode support */
74 @media (prefers-color-scheme: dark) {
75 .abj404-skeleton {
76 /* allow-hardcoded-color: frontend shortcode CSS, theme vars unavailable; dark-mode shimmer tuned for dark host themes. */
77 background: linear-gradient(90deg, #2a2a2a 25%, #333333 50%, #2a2a2a 75%);
78 background-size: 200% 100%;
79 }
80
81 .abj404-loading-text {
82 /* allow-hardcoded-color: frontend shortcode CSS, theme vars unavailable; light gray reads on dark host themes. */
83 color: #aaa;
84 }
85
86 .abj404-no-suggestions {
87 /* allow-hardcoded-color: frontend shortcode CSS, theme vars unavailable; light gray reads on dark host themes. */
88 color: #aaa;
89 }
90 }
91
92 /* ---------------------------------------------------------------------------
93 * Admin-only note below the suggestion list. Deliberately quiet: no box, no
94 * colour fill, no icon. A hairline rule on the left and small grey text, so
95 * it reads as an aside on someone else's theme rather than as plugin chrome.
96 * ------------------------------------------------------------------------ */
97 .abj404-admin-note {
98 font-size: 13px;
99 line-height: 1.5;
100 /* allow-hardcoded-color: frontend shortcode CSS; admin theme vars are not loaded on the user site, and this grey has to read on any host theme. */
101 color: #646970;
102 margin: 10px 0 0;
103 padding-left: 10px;
104 /* allow-hardcoded-color: frontend shortcode CSS, theme vars unavailable; matches the WordPress admin hairline grey. */
105 border-left: 3px solid #dcdcde;
106 }
107
108 .abj404-admin-note a {
109 /* allow-hardcoded-color: frontend shortcode CSS, theme vars unavailable; WordPress admin link blue, readable on light host themes. */
110 color: #2271b1;
111 }
112
113 @media (prefers-color-scheme: dark) {
114 .abj404-admin-note {
115 /* allow-hardcoded-color: frontend shortcode CSS, theme vars unavailable; light grey reads on dark host themes. */
116 color: #a7aaad;
117 /* allow-hardcoded-color: frontend shortcode CSS, theme vars unavailable; dark-mode hairline. */
118 border-left-color: #4f5255;
119 }
120
121 .abj404-admin-note a {
122 /* allow-hardcoded-color: frontend shortcode CSS, theme vars unavailable; WordPress admin light-blue link for dark backgrounds. */
123 color: #72aee6;
124 }
125 }
126