| 1 |
/** |
| 2 |
* OpenStation — Posts app styles. |
| 3 |
* |
| 4 |
* The list layout (toolbar, body, pager, tabs, the phone rules) is the |
| 5 |
* framework's `.os-app-list*` family in `assets/css/app-runtime.css`; |
| 6 |
* this sheet owns what is the Posts window's alone: the term canvas — |
| 7 |
* one chrome (`.os-term-canvas*`) the Categories mind map and the Tags |
| 8 |
* cloud both wear, each with a modifier for its own background — and |
| 9 |
* its phone fold. Cell-content styles are inlined in `parts/cells/`, |
| 10 |
* since <os-table> paints into its own shadow root. |
| 11 |
*/ |
| 12 |
|
| 13 |
.os-posts__terms-host { |
| 14 |
display: flex; |
| 15 |
flex-direction: column; |
| 16 |
flex: 1 1 auto; |
| 17 |
min-height: 0; |
| 18 |
min-width: 0; |
| 19 |
} |
| 20 |
|
| 21 |
/* --------------------------------------------------------------- |
| 22 |
* The term canvas: a toolbar across the top, the Pixi stage on the |
| 23 |
* left, a fixed-width sidebar editor on the right. The Pixi side |
| 24 |
* paints the terms, the post satellites and the pager into the |
| 25 |
* canvas; this sheet owns the chrome around it. */ |
| 26 |
.os-term-canvas { |
| 27 |
flex: 1 1 auto; |
| 28 |
min-height: 0; |
| 29 |
min-width: 0; |
| 30 |
display: flex; |
| 31 |
flex-direction: column; |
| 32 |
background: var( --os-ui-surface, #fff ); |
| 33 |
} |
| 34 |
|
| 35 |
/* The mind map's surface: a dot grid — the "infinite thinking |
| 36 |
* surface" texture — under two theme-tinted vignettes for depth. */ |
| 37 |
.os-term-canvas.os-mindmap { |
| 38 |
background: |
| 39 |
radial-gradient( |
| 40 |
circle, |
| 41 |
var( --os-ui-border, rgba( 0, 0, 0, 0.06 ) ) 1px, |
| 42 |
transparent 1.5px |
| 43 |
) 0 0 / 24px 24px, |
| 44 |
radial-gradient( |
| 45 |
ellipse at 28% 22%, |
| 46 |
color-mix( |
| 47 |
in srgb, |
| 48 |
var( --wp-admin-theme-color, #2271b1 ) 8%, |
| 49 |
transparent |
| 50 |
), |
| 51 |
transparent 60% |
| 52 |
), |
| 53 |
radial-gradient( |
| 54 |
ellipse at 78% 80%, |
| 55 |
color-mix( |
| 56 |
in srgb, |
| 57 |
var( --wp-admin-theme-color, #2271b1 ) 5%, |
| 58 |
transparent |
| 59 |
), |
| 60 |
transparent 58% |
| 61 |
), |
| 62 |
var( --os-ui-surface, #fff ); |
| 63 |
} |
| 64 |
|
| 65 |
/* The tag cloud's surface: faint diagonal pinstripes — a sticker wall. */ |
| 66 |
.os-term-canvas.os-tagcloud { |
| 67 |
background: |
| 68 |
repeating-linear-gradient( |
| 69 |
135deg, |
| 70 |
transparent 0, |
| 71 |
transparent 22px, |
| 72 |
color-mix( in srgb, var( --wp-admin-theme-color, #2271b1 ) 4%, transparent ) 22px, |
| 73 |
color-mix( in srgb, var( --wp-admin-theme-color, #2271b1 ) 4%, transparent ) 23px |
| 74 |
), |
| 75 |
radial-gradient( |
| 76 |
circle at 30% 20%, |
| 77 |
color-mix( |
| 78 |
in srgb, |
| 79 |
var( --wp-admin-theme-color, #2271b1 ) 6%, |
| 80 |
transparent |
| 81 |
), |
| 82 |
transparent 65% |
| 83 |
), |
| 84 |
var( --os-ui-surface, #fff ); |
| 85 |
} |
| 86 |
|
| 87 |
.os-term-canvas__toolbar { |
| 88 |
display: flex; |
| 89 |
align-items: center; |
| 90 |
gap: 10px; |
| 91 |
padding: 10px 14px; |
| 92 |
border-bottom: 1px solid var( --os-ui-border, rgba( 0, 0, 0, 0.08 ) ); |
| 93 |
background: var( --os-ui-surface, rgba( 255, 255, 255, 0.6 ) ); |
| 94 |
backdrop-filter: blur( 8px ); |
| 95 |
/* A stacking context, so the search dropdown paints above the |
| 96 |
* pixi canvas in the layout sibling below. Without it the canvas |
| 97 |
* (later in the DOM, no z-index) wins the paint order and the |
| 98 |
* dropdown renders BEHIND the chips — clicks land on the canvas. */ |
| 99 |
position: relative; |
| 100 |
z-index: 2; |
| 101 |
} |
| 102 |
|
| 103 |
.os-term-canvas__btn { |
| 104 |
appearance: none; |
| 105 |
display: inline-flex; |
| 106 |
align-items: center; |
| 107 |
gap: 4px; |
| 108 |
padding: 6px 10px; |
| 109 |
font: inherit; |
| 110 |
font-size: 12px; |
| 111 |
font-weight: 500; |
| 112 |
border: 1px solid var( --os-ui-border, #c3c4c7 ); |
| 113 |
border-radius: 6px; |
| 114 |
background: transparent; |
| 115 |
color: var( --os-ui-fg, #1d2327 ); |
| 116 |
cursor: pointer; |
| 117 |
transition: background-color 0.12s ease, border-color 0.12s ease, |
| 118 |
color 0.12s ease; |
| 119 |
} |
| 120 |
|
| 121 |
.os-term-canvas__btn:hover { |
| 122 |
background: var( --os-ui-hover, rgba( 0, 0, 0, 0.04 ) ); |
| 123 |
border-color: var( --wp-admin-theme-color, #2271b1 ); |
| 124 |
} |
| 125 |
|
| 126 |
.os-term-canvas__btn--primary { |
| 127 |
background: var( --wp-admin-theme-color, #2271b1 ); |
| 128 |
color: var( --os-ui-fg-on-accent, #fff ); |
| 129 |
border-color: transparent; |
| 130 |
} |
| 131 |
|
| 132 |
.os-term-canvas__btn--primary:hover { |
| 133 |
filter: brightness( 1.05 ); |
| 134 |
background: var( --wp-admin-theme-color, #2271b1 ); |
| 135 |
color: var( --os-ui-fg-on-accent, #fff ); |
| 136 |
} |
| 137 |
|
| 138 |
.os-term-canvas__btn--secondary { |
| 139 |
background: var( --os-ui-hover, rgba( 0, 0, 0, 0.04 ) ); |
| 140 |
} |
| 141 |
|
| 142 |
.os-term-canvas__btn--danger { |
| 143 |
color: var( --os-ui-danger, #d63638 ); |
| 144 |
border-color: transparent; |
| 145 |
} |
| 146 |
|
| 147 |
.os-term-canvas__btn--danger:hover { |
| 148 |
background: color-mix( in srgb, var( --os-ui-danger, #d63638 ) 10%, transparent ); |
| 149 |
border-color: color-mix( in srgb, var( --os-ui-danger, #d63638 ) 35%, transparent ); |
| 150 |
} |
| 151 |
|
| 152 |
.os-term-canvas__btn--danger.is-armed { |
| 153 |
background: var( --os-ui-danger, #d63638 ); |
| 154 |
color: var( --os-ui-fg-on-accent, #fff ); |
| 155 |
border-color: transparent; |
| 156 |
} |
| 157 |
|
| 158 |
.os-term-canvas__hint { |
| 159 |
flex: 1 1 auto; |
| 160 |
font-size: 12px; |
| 161 |
font-style: italic; |
| 162 |
color: var( --os-ui-fg-muted, #50575e ); |
| 163 |
text-align: end; |
| 164 |
overflow: hidden; |
| 165 |
text-overflow: ellipsis; |
| 166 |
white-space: nowrap; |
| 167 |
} |
| 168 |
|
| 169 |
.os-term-canvas__search { |
| 170 |
position: relative; |
| 171 |
flex: 0 1 280px; |
| 172 |
min-width: 180px; |
| 173 |
} |
| 174 |
|
| 175 |
.os-term-canvas__search-input { |
| 176 |
width: 100%; |
| 177 |
padding: 6px 10px; |
| 178 |
border: 1px solid var( --os-ui-border, #d8dde4 ); |
| 179 |
border-radius: 6px; |
| 180 |
background: var( --os-ui-surface, #fff ); |
| 181 |
color: inherit; |
| 182 |
font: inherit; |
| 183 |
font-size: 13px; |
| 184 |
} |
| 185 |
|
| 186 |
.os-term-canvas__search-input:focus { |
| 187 |
outline: none; |
| 188 |
border-color: var( --os-ui-accent, var( --wp-admin-theme-color, #2271b1 ) ); |
| 189 |
box-shadow: 0 0 0 3px |
| 190 |
var( --os-ui-accent-soft, rgba( 34, 113, 177, 0.18 ) ); |
| 191 |
} |
| 192 |
|
| 193 |
.os-term-canvas__search-results { |
| 194 |
position: absolute; |
| 195 |
top: calc( 100% + 4px ); |
| 196 |
inset-inline-start: 0; |
| 197 |
inset-inline-end: 0; |
| 198 |
margin: 0; |
| 199 |
padding: 4px; |
| 200 |
list-style: none; |
| 201 |
background: var( --os-ui-surface-elevated, #fff ); |
| 202 |
border: 1px solid var( --os-ui-border, #d8dde4 ); |
| 203 |
border-radius: 8px; |
| 204 |
box-shadow: 0 6px 18px rgba( 17, 24, 39, 0.08 ); |
| 205 |
z-index: 100; |
| 206 |
max-height: 300px; |
| 207 |
overflow-y: auto; |
| 208 |
} |
| 209 |
|
| 210 |
.os-term-canvas__search-result { |
| 211 |
display: flex; |
| 212 |
align-items: center; |
| 213 |
justify-content: space-between; |
| 214 |
gap: 8px; |
| 215 |
width: 100%; |
| 216 |
padding: 6px 10px; |
| 217 |
background: transparent; |
| 218 |
border: 0; |
| 219 |
border-radius: 6px; |
| 220 |
color: inherit; |
| 221 |
cursor: pointer; |
| 222 |
text-align: start; |
| 223 |
font: inherit; |
| 224 |
font-size: 13px; |
| 225 |
} |
| 226 |
|
| 227 |
.os-term-canvas__search-result:hover, |
| 228 |
.os-term-canvas__search-result.is-active { |
| 229 |
background: var( --os-ui-hover, rgba( 79, 139, 243, 0.08 ) ); |
| 230 |
} |
| 231 |
|
| 232 |
.os-term-canvas__search-title { |
| 233 |
flex: 1; |
| 234 |
overflow: hidden; |
| 235 |
text-overflow: ellipsis; |
| 236 |
white-space: nowrap; |
| 237 |
} |
| 238 |
|
| 239 |
.os-term-canvas__search-meta { |
| 240 |
font-size: 11px; |
| 241 |
color: var( --os-ui-fg-muted, #6b7280 ); |
| 242 |
white-space: nowrap; |
| 243 |
} |
| 244 |
|
| 245 |
/* Two columns: the Pixi stage on the left, the sidebar on the right. |
| 246 |
* The sidebar always renders — the empty-state copy when nothing is |
| 247 |
* focused, the editor form otherwise — so the editing surface never |
| 248 |
* covers the terms. */ |
| 249 |
.os-term-canvas__layout { |
| 250 |
display: flex; |
| 251 |
flex: 1 1 auto; |
| 252 |
min-height: 0; |
| 253 |
min-width: 0; |
| 254 |
} |
| 255 |
|
| 256 |
.os-term-canvas__stage { |
| 257 |
position: relative; |
| 258 |
flex: 1 1 auto; |
| 259 |
min-height: 0; |
| 260 |
min-width: 0; |
| 261 |
overflow: hidden; |
| 262 |
/* Fades in once the first fit-to-view has run: without it the |
| 263 |
* canvas paints its unfitted transform on the frame between mount |
| 264 |
* and the first rAF, which reads as a flash. */ |
| 265 |
transition: opacity 200ms ease; |
| 266 |
} |
| 267 |
|
| 268 |
.os-term-canvas__stage.is-loading { |
| 269 |
opacity: 0; |
| 270 |
} |
| 271 |
|
| 272 |
.os-term-canvas__sidebar { |
| 273 |
flex: 0 0 320px; |
| 274 |
display: flex; |
| 275 |
flex-direction: column; |
| 276 |
gap: 12px; |
| 277 |
padding: 16px; |
| 278 |
border-inline-start: 1px solid var( --os-ui-border, rgba( 0, 0, 0, 0.08 ) ); |
| 279 |
background: var( --os-ui-surface, #fff ); |
| 280 |
color: var( --os-ui-fg, #1d2327 ); |
| 281 |
overflow-y: auto; |
| 282 |
min-height: 0; |
| 283 |
} |
| 284 |
|
| 285 |
.os-term-canvas__sidebar-empty { |
| 286 |
flex: 1 1 auto; |
| 287 |
display: flex; |
| 288 |
flex-direction: column; |
| 289 |
align-items: center; |
| 290 |
justify-content: center; |
| 291 |
gap: 6px; |
| 292 |
color: var( --os-ui-fg-muted, #50575e ); |
| 293 |
text-align: center; |
| 294 |
padding: 24px 8px; |
| 295 |
} |
| 296 |
|
| 297 |
.os-term-canvas__sidebar-empty .dashicons { |
| 298 |
font-size: 36px; |
| 299 |
width: 36px; |
| 300 |
height: 36px; |
| 301 |
opacity: 0.5; |
| 302 |
} |
| 303 |
|
| 304 |
.os-term-canvas__sidebar-empty-title { |
| 305 |
font-size: 13px; |
| 306 |
font-weight: 600; |
| 307 |
color: var( --os-ui-fg, #1d2327 ); |
| 308 |
margin: 0; |
| 309 |
} |
| 310 |
|
| 311 |
.os-term-canvas__sidebar-empty-hint { |
| 312 |
font-size: 12px; |
| 313 |
font-style: italic; |
| 314 |
max-width: 220px; |
| 315 |
margin: 0; |
| 316 |
} |
| 317 |
|
| 318 |
/* The cloud's hint runs a line longer. */ |
| 319 |
.os-tagcloud .os-term-canvas__sidebar-empty-hint { |
| 320 |
max-width: 240px; |
| 321 |
} |
| 322 |
|
| 323 |
.os-term-canvas__sidebar-header { |
| 324 |
display: flex; |
| 325 |
align-items: center; |
| 326 |
gap: 8px; |
| 327 |
font-size: 11px; |
| 328 |
font-weight: 600; |
| 329 |
letter-spacing: 0.04em; |
| 330 |
text-transform: uppercase; |
| 331 |
color: var( --os-ui-fg-muted, #50575e ); |
| 332 |
} |
| 333 |
|
| 334 |
.os-term-canvas__sidebar-dot { |
| 335 |
width: 10px; |
| 336 |
height: 10px; |
| 337 |
border-radius: 50%; |
| 338 |
flex: 0 0 10px; |
| 339 |
} |
| 340 |
|
| 341 |
.os-term-canvas__sidebar-slug { |
| 342 |
overflow: hidden; |
| 343 |
text-overflow: ellipsis; |
| 344 |
white-space: nowrap; |
| 345 |
} |
| 346 |
|
| 347 |
.os-term-canvas__sidebar-label { |
| 348 |
font-size: 11px; |
| 349 |
font-weight: 500; |
| 350 |
color: var( --os-ui-fg-muted, #50575e ); |
| 351 |
margin-block-start: 4px; |
| 352 |
} |
| 353 |
|
| 354 |
.os-term-canvas__sidebar-meta { |
| 355 |
font-size: 12px; |
| 356 |
color: var( --os-ui-fg-muted, #50575e ); |
| 357 |
padding-block: 4px; |
| 358 |
} |
| 359 |
|
| 360 |
.os-term-canvas__canvas { |
| 361 |
display: block; |
| 362 |
position: absolute; |
| 363 |
inset: 0; |
| 364 |
width: 100%; |
| 365 |
height: 100%; |
| 366 |
touch-action: none; |
| 367 |
} |
| 368 |
|
| 369 |
.os-term-canvas__editor-name { |
| 370 |
appearance: none; |
| 371 |
font: inherit; |
| 372 |
font-size: 14px; |
| 373 |
font-weight: 600; |
| 374 |
padding: 6px 8px; |
| 375 |
border: 1px solid var( --os-ui-border, #c3c4c7 ); |
| 376 |
border-radius: 6px; |
| 377 |
background: var( --os-ui-surface, #fff ); |
| 378 |
color: inherit; |
| 379 |
} |
| 380 |
|
| 381 |
.os-term-canvas__editor-name:focus, |
| 382 |
.os-term-canvas__editor-desc:focus { |
| 383 |
outline: none; |
| 384 |
border-color: var( --wp-admin-theme-color, #2271b1 ); |
| 385 |
box-shadow: 0 0 0 2px |
| 386 |
color-mix( |
| 387 |
in srgb, |
| 388 |
var( --wp-admin-theme-color, #2271b1 ) 25%, |
| 389 |
transparent |
| 390 |
); |
| 391 |
} |
| 392 |
|
| 393 |
.os-term-canvas__editor-desc { |
| 394 |
appearance: none; |
| 395 |
font: inherit; |
| 396 |
font-size: 12px; |
| 397 |
padding: 6px 8px; |
| 398 |
border: 1px solid var( --os-ui-border, #c3c4c7 ); |
| 399 |
border-radius: 6px; |
| 400 |
background: var( --os-ui-surface, #fff ); |
| 401 |
color: inherit; |
| 402 |
resize: vertical; |
| 403 |
min-height: 46px; |
| 404 |
} |
| 405 |
|
| 406 |
.os-term-canvas__editor-actions { |
| 407 |
display: flex; |
| 408 |
gap: 6px; |
| 409 |
flex-wrap: wrap; |
| 410 |
} |
| 411 |
|
| 412 |
.os-term-canvas__editor-actions .os-term-canvas__btn { |
| 413 |
flex: 1 1 auto; |
| 414 |
justify-content: center; |
| 415 |
} |
| 416 |
|
| 417 |
.os-term-canvas__empty { |
| 418 |
position: absolute; |
| 419 |
inset: 0; |
| 420 |
display: flex; |
| 421 |
align-items: center; |
| 422 |
justify-content: center; |
| 423 |
pointer-events: none; |
| 424 |
color: var( --os-ui-fg-muted, #50575e ); |
| 425 |
font-size: 13px; |
| 426 |
font-style: italic; |
| 427 |
text-align: center; |
| 428 |
padding: 0 24px; |
| 429 |
} |
| 430 |
|
| 431 |
/* |
| 432 |
* The canvas keeps a 320px editor beside the stage on a desk. A phone |
| 433 |
* has no beside: the editor folds UNDER the stage as a sheet — at |
| 434 |
* most half the height, its own scroll, clearing the home indicator — |
| 435 |
* and only while a term is focused; while it would only say "select |
| 436 |
* a term" it is not there, and the stage has the whole screen. The |
| 437 |
* same fold under a narrow container, for a desk window pulled in. |
| 438 |
*/ |
| 439 |
html[data-os-mode="mobile"] .os-term-canvas__layout { |
| 440 |
flex-direction: column; |
| 441 |
} |
| 442 |
html[data-os-mode="mobile"] .os-term-canvas__sidebar { |
| 443 |
flex: 0 0 auto; |
| 444 |
max-block-size: 50%; |
| 445 |
border-inline-start: 0; |
| 446 |
border-block-start: 1px solid var( --os-ui-border, rgba( 0, 0, 0, 0.08 ) ); |
| 447 |
padding: 12px 16px calc( 12px + env( safe-area-inset-bottom, 0px ) ); |
| 448 |
box-shadow: 0 -6px 18px rgba( 0, 0, 0, 0.06 ); |
| 449 |
} |
| 450 |
html[data-os-mode="mobile"] .os-term-canvas__sidebar:has( > .os-term-canvas__sidebar-empty ) { |
| 451 |
display: none; |
| 452 |
} |
| 453 |
@container ( max-width: 640px ) { |
| 454 |
.os-term-canvas__layout { |
| 455 |
flex-direction: column; |
| 456 |
} |
| 457 |
.os-term-canvas__sidebar { |
| 458 |
flex: 0 0 auto; |
| 459 |
max-block-size: 50%; |
| 460 |
border-inline-start: 0; |
| 461 |
border-block-start: 1px solid var( --os-ui-border, rgba( 0, 0, 0, 0.08 ) ); |
| 462 |
} |
| 463 |
.os-term-canvas__sidebar:has( > .os-term-canvas__sidebar-empty ) { |
| 464 |
display: none; |
| 465 |
} |
| 466 |
} |
| 467 |
|