| 1 |
/** |
| 2 |
* xSpeed — deactivation feedback modal. Spec: DESIGN.md §24.16. |
| 3 |
* |
| 4 |
* Self-contained styles for the plugins.php survey. Scoped under |
| 5 |
* .xspeed-deactivate so nothing leaks into the WP admin. This markup is NOT |
| 6 |
* inside the React `#xspeed-app` tree, so Tailwind utilities aren't available |
| 7 |
* here (the config is `important: '#xspeed-app'` and scans `src/` only). The |
| 8 |
* custom properties below therefore RESTATE the §2 token table rather than |
| 9 |
* inventing a parallel palette — every value is a literal from §2, so a token |
| 10 |
* change there is a find-and-replace here. |
| 11 |
* |
| 12 |
* DARK MODE — driven by `.xspeed-deactivate--dark`, stamped server-side from |
| 13 |
* the same `xspeed_theme` cookie the dashboard reads (Admin::user_theme()). |
| 14 |
* NOT `prefers-color-scheme`: that follows the OS and ignores xSpeed's own |
| 15 |
* theme toggle. NOT `body.xspeed-dark` either — Admin::admin_body_class() |
| 16 |
* bails on screens we don't own, so that class never exists on plugins.php. |
| 17 |
* See render_modal() in includes/class-deactivation-feedback.php. |
| 18 |
*/ |
| 19 |
|
| 20 |
.xspeed-deactivate { |
| 21 |
/* §2 light column. */ |
| 22 |
--xspeed-accent: #2563eb; /* accent */ |
| 23 |
--xspeed-accent-hover: #1d4ed8; /* accent, pressed (blue-700) */ |
| 24 |
--xspeed-surface: #ffffff; /* bg-card */ |
| 25 |
--xspeed-text: #171717; /* text */ |
| 26 |
--xspeed-muted: #737373; /* text-muted (neutral-500) */ |
| 27 |
--xspeed-border: #e5e5e5; /* border */ |
| 28 |
--xspeed-border-input: #d4d4d4; /* border-input */ |
| 29 |
--xspeed-hover: #f3f4f3; /* sidebar-hover */ |
| 30 |
--xspeed-tint: #eff6ff; /* accent ground (blue-50) */ |
| 31 |
--xspeed-tint-border: #bfdbfe; /* accent ground border (blue-200) */ |
| 32 |
--xspeed-tint-text: #1d4ed8; /* accent-on-tint (blue-700) */ |
| 33 |
|
| 34 |
position: fixed; |
| 35 |
inset: 0; |
| 36 |
z-index: 100000; |
| 37 |
display: none; |
| 38 |
align-items: center; |
| 39 |
justify-content: center; |
| 40 |
padding: 24px; |
| 41 |
box-sizing: border-box; |
| 42 |
} |
| 43 |
|
| 44 |
.xspeed-deactivate.is-open { |
| 45 |
display: flex; |
| 46 |
} |
| 47 |
|
| 48 |
.xspeed-deactivate * { |
| 49 |
box-sizing: border-box; |
| 50 |
} |
| 51 |
|
| 52 |
/* Scrim: neutral-950 at 55%, the one dimming layer §24.16 allows. */ |
| 53 |
.xspeed-deactivate__overlay { |
| 54 |
position: absolute; |
| 55 |
inset: 0; |
| 56 |
background: rgba(10, 10, 10, 0.55); |
| 57 |
} |
| 58 |
|
| 59 |
/** |
| 60 |
* §5 allows two radii; the dialog is a card surface, so it takes the |
| 61 |
* `rounded-lg` 8px — not the 10px the app SHELL uses (§6), which is a |
| 62 |
* fixed-chrome exception, not a card value. Shadow stays within the |
| 63 |
* §23 ceiling (shadow-md); no entrance animation, per §18. |
| 64 |
*/ |
| 65 |
.xspeed-deactivate__dialog { |
| 66 |
position: relative; |
| 67 |
width: 100%; |
| 68 |
max-width: 480px; |
| 69 |
max-height: calc(100vh - 48px); |
| 70 |
display: flex; |
| 71 |
flex-direction: column; |
| 72 |
background: var(--xspeed-surface); |
| 73 |
color: var(--xspeed-text); |
| 74 |
border: 1px solid var(--xspeed-border); |
| 75 |
border-radius: 8px; |
| 76 |
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); |
| 77 |
overflow: hidden; |
| 78 |
} |
| 79 |
|
| 80 |
/* Header */ |
| 81 |
.xspeed-deactivate__header { |
| 82 |
display: flex; |
| 83 |
align-items: center; |
| 84 |
justify-content: space-between; |
| 85 |
padding: 14px 18px; |
| 86 |
border-bottom: 1px solid var(--xspeed-border); |
| 87 |
} |
| 88 |
|
| 89 |
.xspeed-deactivate__brand { |
| 90 |
display: inline-flex; |
| 91 |
align-items: center; |
| 92 |
gap: 8px; |
| 93 |
font-size: 14px; |
| 94 |
font-weight: 600; |
| 95 |
} |
| 96 |
|
| 97 |
/** |
| 98 |
* The bundled mark is `fill="currentColor"`, which an <img> cannot inherit — |
| 99 |
* it always rasterizes BLACK, so on the dark surface it disappeared entirely. |
| 100 |
* `invert` in dark is the same fix the dashboard chrome uses (§BrandLogo's |
| 101 |
* `dark:invert`, and the boot skeleton in class-admin.php); `color` here was |
| 102 |
* dead for the same <img> reason and is gone. |
| 103 |
*/ |
| 104 |
.xspeed-deactivate__logo { |
| 105 |
width: 24px; |
| 106 |
height: 24px; |
| 107 |
flex: 0 0 auto; |
| 108 |
} |
| 109 |
|
| 110 |
.xspeed-deactivate--dark .xspeed-deactivate__logo { |
| 111 |
filter: invert(1); |
| 112 |
} |
| 113 |
|
| 114 |
.xspeed-deactivate__close { |
| 115 |
appearance: none; |
| 116 |
border: 0; |
| 117 |
background: transparent; |
| 118 |
color: var(--xspeed-muted); |
| 119 |
font-size: 22px; |
| 120 |
line-height: 1; |
| 121 |
cursor: pointer; |
| 122 |
padding: 4px 8px; |
| 123 |
border-radius: 6px; |
| 124 |
transition: background-color 150ms, color 150ms; /* §18 hover */ |
| 125 |
} |
| 126 |
|
| 127 |
.xspeed-deactivate__close:hover { |
| 128 |
background: var(--xspeed-hover); |
| 129 |
color: var(--xspeed-text); |
| 130 |
} |
| 131 |
|
| 132 |
/* Body */ |
| 133 |
.xspeed-deactivate__body { |
| 134 |
padding: 18px; |
| 135 |
overflow-y: auto; |
| 136 |
} |
| 137 |
|
| 138 |
.xspeed-deactivate__title { |
| 139 |
margin: 0 0 6px; |
| 140 |
font-size: 18px; /* §3 page title */ |
| 141 |
font-weight: 600; |
| 142 |
color: var(--xspeed-text); |
| 143 |
} |
| 144 |
|
| 145 |
.xspeed-deactivate__sub { |
| 146 |
margin: 0 0 16px; |
| 147 |
font-size: 13px; |
| 148 |
line-height: 1.55; |
| 149 |
color: var(--xspeed-muted); |
| 150 |
} |
| 151 |
|
| 152 |
/* Reasons */ |
| 153 |
.xspeed-deactivate__reasons { |
| 154 |
display: flex; |
| 155 |
flex-direction: column; |
| 156 |
gap: 2px; |
| 157 |
} |
| 158 |
|
| 159 |
.xspeed-deactivate__option { |
| 160 |
display: flex; |
| 161 |
align-items: center; |
| 162 |
gap: 10px; |
| 163 |
padding: 9px 10px; |
| 164 |
border-radius: 6px; |
| 165 |
font-size: 13px; /* §3 body */ |
| 166 |
cursor: pointer; |
| 167 |
transition: background-color 150ms; /* §18 hover */ |
| 168 |
} |
| 169 |
|
| 170 |
.xspeed-deactivate__option:hover { |
| 171 |
background: var(--xspeed-hover); |
| 172 |
} |
| 173 |
|
| 174 |
.xspeed-deactivate__reason:has(input:checked) .xspeed-deactivate__option { |
| 175 |
background: var(--xspeed-tint); |
| 176 |
color: var(--xspeed-tint-text); |
| 177 |
font-weight: 500; /* §3 card row label */ |
| 178 |
} |
| 179 |
|
| 180 |
.xspeed-deactivate__option input[type="radio"], |
| 181 |
.xspeed-deactivate__option input[type="checkbox"] { |
| 182 |
margin: 0; |
| 183 |
accent-color: var(--xspeed-accent); |
| 184 |
flex: 0 0 auto; |
| 185 |
} |
| 186 |
|
| 187 |
.xspeed-deactivate__detail { |
| 188 |
width: 100%; |
| 189 |
margin: 6px 0 4px; |
| 190 |
padding: 8px 10px; |
| 191 |
font-size: 13px; |
| 192 |
line-height: 1.5; |
| 193 |
color: var(--xspeed-text); |
| 194 |
border: 1px solid var(--xspeed-border-input); /* §2 border-input */ |
| 195 |
border-radius: 6px; |
| 196 |
resize: vertical; |
| 197 |
background: var(--xspeed-surface); |
| 198 |
} |
| 199 |
|
| 200 |
.xspeed-deactivate__detail:focus { |
| 201 |
outline: none; |
| 202 |
border-color: var(--xspeed-accent); |
| 203 |
box-shadow: 0 0 0 1px var(--xspeed-accent); |
| 204 |
} |
| 205 |
|
| 206 |
.xspeed-deactivate__help { |
| 207 |
margin: 4px 0 6px; |
| 208 |
padding: 10px 12px; |
| 209 |
background: var(--xspeed-tint); |
| 210 |
border: 1px solid var(--xspeed-tint-border); |
| 211 |
border-radius: 6px; |
| 212 |
font-size: 12px; /* §3 hint */ |
| 213 |
line-height: 1.5; |
| 214 |
} |
| 215 |
|
| 216 |
.xspeed-deactivate__help-title { |
| 217 |
display: block; |
| 218 |
font-weight: 600; |
| 219 |
color: var(--xspeed-text); |
| 220 |
margin-bottom: 2px; |
| 221 |
} |
| 222 |
|
| 223 |
/* Accent-on-tint, so the link stays legible on the tinted ground in both themes. */ |
| 224 |
.xspeed-deactivate__help a { |
| 225 |
color: var(--xspeed-tint-text); |
| 226 |
font-weight: 500; |
| 227 |
text-decoration: none; |
| 228 |
} |
| 229 |
|
| 230 |
.xspeed-deactivate__help a:hover { |
| 231 |
text-decoration: underline; |
| 232 |
} |
| 233 |
|
| 234 |
.xspeed-deactivate__privacy { |
| 235 |
margin: 14px 0 0; |
| 236 |
font-size: 11px; /* §3 micro */ |
| 237 |
line-height: 1.5; |
| 238 |
color: var(--xspeed-muted); |
| 239 |
} |
| 240 |
|
| 241 |
/* Footer */ |
| 242 |
.xspeed-deactivate__footer { |
| 243 |
display: flex; |
| 244 |
align-items: center; |
| 245 |
justify-content: space-between; |
| 246 |
gap: 12px; |
| 247 |
padding: 14px 18px; |
| 248 |
border-top: 1px solid var(--xspeed-border); |
| 249 |
} |
| 250 |
|
| 251 |
.xspeed-deactivate__skip { |
| 252 |
font-size: 13px; |
| 253 |
color: var(--xspeed-muted); |
| 254 |
text-decoration: none; |
| 255 |
} |
| 256 |
|
| 257 |
.xspeed-deactivate__skip:hover { |
| 258 |
color: var(--xspeed-text); |
| 259 |
text-decoration: underline; |
| 260 |
} |
| 261 |
|
| 262 |
.xspeed-deactivate__submit.button.button-primary { |
| 263 |
background: var(--xspeed-accent); |
| 264 |
border-color: var(--xspeed-accent); |
| 265 |
box-shadow: none; |
| 266 |
text-shadow: none; |
| 267 |
padding: 4px 16px; |
| 268 |
height: auto; |
| 269 |
min-height: 34px; |
| 270 |
border-radius: 6px; |
| 271 |
font-weight: 600; |
| 272 |
} |
| 273 |
|
| 274 |
.xspeed-deactivate__submit.button.button-primary:hover, |
| 275 |
.xspeed-deactivate__submit.button.button-primary:focus { |
| 276 |
background: var(--xspeed-accent-hover); |
| 277 |
border-color: var(--xspeed-accent-hover); |
| 278 |
} |
| 279 |
|
| 280 |
.xspeed-deactivate__submit.is-loading { |
| 281 |
opacity: 0.7; |
| 282 |
cursor: default; |
| 283 |
} |
| 284 |
|
| 285 |
body.xspeed-deactivate-lock { |
| 286 |
overflow: hidden; |
| 287 |
} |
| 288 |
|
| 289 |
/** |
| 290 |
* Dark scheme — follows xSpeed's OWN theme toggle, never the OS. |
| 291 |
* `.xspeed-deactivate--dark` is stamped server-side from the `xspeed_theme` |
| 292 |
* cookie, so the modal always matches the dashboard the user just left. |
| 293 |
* Values are the §2 dark column. |
| 294 |
*/ |
| 295 |
.xspeed-deactivate--dark { |
| 296 |
--xspeed-surface: #171717; /* bg-card (neutral-900) */ |
| 297 |
--xspeed-text: #fafafa; /* text */ |
| 298 |
--xspeed-muted: #a3a3a3; /* text-muted (neutral-400) */ |
| 299 |
--xspeed-border: #2a2a2a; /* border */ |
| 300 |
--xspeed-border-input: #3f3f46; /* border-input */ |
| 301 |
/** |
| 302 |
* Hover lifts to neutral-800 rather than the dashboard's dark |
| 303 |
* sidebar-hover (neutral-900): here the surface ITSELF is neutral-900 |
| 304 |
* (bg-card), so reusing that value would make every hover invisible. |
| 305 |
* One step up keeps the same "hover is a lift off the surface" reading. |
| 306 |
*/ |
| 307 |
--xspeed-hover: #262626; /* neutral-800 */ |
| 308 |
--xspeed-tint: #17255480; /* accent ground (blue-950/50) */ |
| 309 |
--xspeed-tint-border: #1e40af; /* accent ground border (blue-800) */ |
| 310 |
--xspeed-tint-text: #93c5fd; /* accent-on-tint (blue-300) */ |
| 311 |
} |
| 312 |
|
| 313 |
/** |
| 314 |
* §19 — the only motion left is the 150ms hover tint (§18). Still honored |
| 315 |
* explicitly, so the modal makes no assumptions the rest of the app doesn't. |
| 316 |
*/ |
| 317 |
@media (prefers-reduced-motion: reduce) { |
| 318 |
.xspeed-deactivate * { |
| 319 |
transition: none !important; |
| 320 |
} |
| 321 |
} |
| 322 |
|
| 323 |
/* Small screens */ |
| 324 |
@media (max-width: 600px) { |
| 325 |
.xspeed-deactivate { |
| 326 |
padding: 12px; |
| 327 |
} |
| 328 |
|
| 329 |
.xspeed-deactivate__footer { |
| 330 |
flex-direction: column-reverse; |
| 331 |
align-items: stretch; |
| 332 |
} |
| 333 |
|
| 334 |
.xspeed-deactivate__submit.button.button-primary { |
| 335 |
width: 100%; |
| 336 |
} |
| 337 |
|
| 338 |
.xspeed-deactivate__skip { |
| 339 |
text-align: center; |
| 340 |
} |
| 341 |
} |
| 342 |
|