oficina / calendar Public

Clone
git clone https://amadan.net/oficina/calendar

Plain git — no account needed to clone.

Download

Download this file

1/* calendar.css — this app's own components.
2 *
3 * Prefix: cal-. Never rst- (rastrillo's namespace, and a future release
4 * may claim a name we took) and never estilo- (the suite's, and these
5 * are not suite components until a second app copies one).
6 *
7 * Grammar: the attribute spelling, matching rastrillo v3 — the KIND is
8 * a bare attribute, a VARIANT is a token in its value matched with ~=,
9 * and a PART is its own flat attribute. Adopted per screen, never per
10 * element.
11 *
12 * Every colour here is a --rst-* token or derived from one with
13 * color-mix. Nothing is a literal hex: the theme's own contrast table
14 * is measured, and a hex dropped in beside it is a value nobody has
15 * measured against anything.
16 */
17
18/* ── The view switcher ─────────────────────────────────────────── */
19
20/* One layout for all four views. Day, Week, Month and Agenda share this
21 * main box, so switching views never moves the header, the toolbar or
22 * the grid's edge (test/browser/views.mjs). 90rem, not rst-page's 64rem
23 * reading column: seven day columns at 64rem are ~134px, too narrow for a
24 * chip's time and title. rst-page's own inline padding is the gutter, the
25 * same 1rem as the estilo bar's, so at 1440 the view's edge lines up with
26 * the bar's brand. */
27[cal-view] { max-width: 90rem; } /* after tokens.css, so it beats rst-page's 64rem */
28
29/* The bar is sticky, so an anchor or :target lands below it, not under
30 * it (shared-chrome spec §5.3). */
31html { scroll-padding-block-start: var(--estilo-bar-block-size); }
32
33/* The toolbar (layout.html "calendar-toolbar"): the steps at the start,
34 * the view switcher at the end, one row wherever it fits. Every label in
35 * it is the same in every view, so nothing in it moves. */
36[cal-bar] {
37 align-items: center;
38 display: flex;
39 flex-wrap: wrap;
40 gap: var(--rst-sp-3);
41 justify-content: space-between;
42 margin-block-end: var(--rst-sp-4);
43}
44
45/* rastrillo v0.42's tokens.css gives the segmented tabs a bottom margin
46 * for a switcher standing alone, and says a row of controls should zero
47 * it: the toolbar's own margin is the gap, so the grid starts where it did.
48 * The view switcher is the toolbar's one nav (layout.html). */
49[cal-bar] > nav {
50 margin-block-end: 0;
51}
52
53[cal-bar-steps] {
54 display: flex;
55 gap: var(--rst-sp-2);
56}
57
58/* A view tab is as wide as its label in the current tab's weight (600,
59 * against 550), whether or not it is current: a hidden bold copy of the
60 * label (the cal-tab attribute) sizes the column. Without it the switcher
61 * narrowed and widened by a fraction of a pixel with every view, and at
62 * the end of the row that moved it. */
63[cal-tab] { display: inline-grid; text-align: center; }
64[cal-tab]::after {
65 block-size: 0;
66 content: attr(cal-tab);
67 font-weight: 600;
68 overflow: hidden;
69 visibility: hidden;
70}
71
72[cal-bar-spacer] { flex: 1 1 auto; }
73
74/* The day's sentence. It is the page's opening line, so it reads at
75 * body size rather than as a caption — a summary set in small grey
76 * type is a summary people learn to skip. */
77[cal-sentence] {
78 color: var(--rst-text);
79 margin: 0 0 var(--rst-sp-4);
80 max-width: 52rem;
81}
82
83/* The agenda's scope line: a caption, not an answer, so it is muted. */
84[cal-sentence-muted] { color: var(--rst-text-muted); }
85
86/* ── Month ─────────────────────────────────────────────────────── */
87
88/* A real table: a month IS tabular data, so the row and column headers
89 * come free for a screen reader and a scriptless page keeps working
90 * semantics a div grid would have to rebuild with ARIA. */
91[cal-month] {
92 border-collapse: collapse;
93 table-layout: fixed;
94 width: 100%;
95}
96
97[cal-month] th {
98 color: var(--rst-text-muted);
99 font-size: var(--rst-fs-sm);
100 font-weight: 600;
101 padding: var(--rst-sp-2);
102 text-align: start;
103}
104
105[cal-month] td {
106 border: 1px solid var(--rst-line);
107 height: 7.5rem;
108 padding: 0;
109 vertical-align: top;
110}
111
112[cal-day-cell] {
113 display: flex;
114 flex-direction: column;
115 gap: 2px; /* spacing-allow: the month grid's chips, stacked tight so a 7.5rem day holds three and its "+N more" */
116 height: 100%;
117 padding: var(--rst-sp-1);
118}
119
120/* Outside the month: dimmed, but never hidden. A month grid whose
121 * leading and trailing days are blank makes the first week look
122 * broken. */
123[cal-day-cell~="outside"] { opacity: 0.55; }
124
125[cal-day-cell~="weekend"] { background: var(--rst-surface-2); }
126
127[cal-day-num] {
128 color: var(--rst-text-muted);
129 display: block;
130 font-size: var(--rst-fs-sm);
131 padding: 2px; /* spacing-allow: the day's number tucked into its cell's corner */
132 text-decoration: none;
133}
134
135[cal-day-num]:hover { text-decoration: underline; }
136
137/* Today. Three signals, never colour alone: a filled marker, bold
138 * weight, and the visually-hidden word "today" in the link's
139 * accessible name. */
140[cal-day-num~="today"] {
141 background: var(--rst-accent);
142 border-radius: var(--rst-radius-pill);
143 color: var(--rst-on-accent);
144 font-weight: 700;
145 inline-size: 1.6rem;
146 text-align: center;
147}
148
149[cal-more] {
150 color: var(--rst-text-muted);
151 font-size: var(--rst-fs-xs);
152 padding-inline-start: 2px; /* spacing-allow: "+N more" sits on the day number's 2px inset, in the month grid's cell */
153}
154
155/* ── Chips ─────────────────────────────────────────────────────── */
156
157/* One event, wherever it appears. The hue is set inline per calendar
158 * as --cal-hue, and every colour below is mixed from it against a
159 * theme token — so a chip stays legible in both schemes without the
160 * calendar's colour being a measured value of its own. */
161[cal-chip] {
162 align-items: baseline;
163 background: color-mix(in oklab, hsl(var(--cal-hue, 220) 60% 50%) 14%, var(--rst-surface));
164 border-inline-start: 3px solid hsl(var(--cal-hue, 220) 55% 45%);
165 border-radius: 0;
166 color: var(--rst-text);
167 display: flex;
168 font-size: var(--rst-fs-sm);
169 gap: var(--rst-sp-1);
170 overflow: hidden;
171 padding: 2px var(--rst-sp-1); /* spacing-allow: a chip is one line of small text, the calendar's own unit in the month cell, the agenda and the day and week columns */
172 text-decoration: none;
173 white-space: nowrap;
174}
175
176[cal-chip]:hover { text-decoration: underline; }
177
178[cal-chip-time] {
179 color: var(--rst-text-muted);
180 flex: none;
181 font-variant-numeric: tabular-nums;
182}
183
184[cal-chip-title] {
185 overflow: hidden;
186 text-overflow: ellipsis;
187}
188
189/* The past is dimmed AND written in the past tense — the tense is in
190 * the markup, so the meaning survives greyscale and a stylesheet that
191 * failed to load. */
192[cal-chip~="past"] { opacity: 0.6; }
193
194/* A cancelled event is struck through and says "Cancelled" in its own
195 * text. Never the line alone. */
196[cal-chip~="cancelled"] [cal-chip-title] { text-decoration: line-through; }
197
198/* A note is a thing that is true of a day without occupying it, so it
199 * is drawn as an outline rather than a filled block. */
200[cal-chip~="note"] {
201 background: transparent;
202 border: 1px dashed color-mix(in oklab, hsl(var(--cal-hue, 220) 55% 45%) 60%, var(--rst-line));
203 border-inline-start-width: 3px;
204}
205
206/* A commitment is yours rather than shared: a quieter fill than a
207 * meeting, so a day of your own work does not read as a day of
208 * meetings. */
209[cal-chip~="commitment"] {
210 background: color-mix(in oklab, hsl(var(--cal-hue, 220) 60% 50%) 7%, var(--rst-surface));
211}
212
213[cal-chip~="tentative"] {
214 border-inline-start-style: dotted;
215}
216
217/* ── Day and week columns ──────────────────────────────────────── */
218
219[cal-grid] {
220 display: grid;
221 gap: 0;
222 grid-template-columns: 3.5rem 1fr;
223 /* The grid scrolls inside the first screen, but never below 24rem: on
224 * a short window (or a phone on its side) 100vh - 20rem is a sliver. */
225 max-block-size: max(24rem, calc(100vh - 20rem));
226 overflow: auto;
227}
228
229[cal-week-grid] {
230 display: grid;
231 gap: 0;
232 grid-template-columns: 3.5rem repeat(7, minmax(6rem, 1fr));
233}
234
235[cal-week-scroll] {
236 /* The grid scrolls inside the first screen, but never below 24rem: on
237 * a short window (or a phone on its side) 100vh - 20rem is a sliver. */
238 max-block-size: max(24rem, calc(100vh - 20rem));
239 overflow: auto;
240}
241
242[cal-hours] {
243 border-inline-end: 1px solid var(--rst-line);
244 position: relative;
245}
246
247[cal-hour] {
248 block-size: 3rem;
249 color: var(--rst-text-faint);
250 font-size: var(--rst-fs-xs);
251 font-variant-numeric: tabular-nums;
252 padding-inline-end: var(--rst-sp-2);
253 text-align: end;
254 /* The label sits at the line it names, not in the box below it. */
255 transform: translateY(-0.5em);
256}
257
258/* The day column. 72rem is 24 hours at 3rem each, so an hour label and
259 * the grid line beside it stay in step. */
260[cal-column] {
261 block-size: 72rem;
262 border-inline-end: 1px solid var(--rst-line);
263 position: relative;
264}
265
266[cal-column-head] {
267 /* A fixed height, so the all-day row can stick exactly beneath it. */
268 align-items: center;
269 block-size: var(--cal-week-head-size);
270 border-block-end: 1px solid var(--rst-line);
271 box-sizing: border-box;
272 display: flex;
273 justify-content: center;
274 padding: 0 var(--rst-sp-2);
275 position: sticky;
276 text-align: center;
277 /* 0, not --estilo-bar-block-size: the heads stick inside
278 * [cal-week-scroll], which is their own scroll box, so the sticky bar
279 * above the page never overlaps them. The bar's offset here left a 52px
280 * band of hour rows painted above the day names. */
281 top: 0;
282 z-index: 2;
283 background: var(--rst-bg);
284}
285
286[cal-column-head~="today"] { font-weight: 700; }
287
288[cal-week-grid] { --cal-week-head-size: 2.5rem; }
289
290/* The hour rules, drawn as a repeating background so 24 of them cost
291 * one declaration rather than 24 elements. */
292[cal-column-rules] {
293 background-image: repeating-linear-gradient(
294 to bottom,
295 var(--rst-line) 0,
296 var(--rst-line) 1px,
297 transparent 1px,
298 transparent 3rem
299 );
300 inset: 0;
301 position: absolute;
302}
303
304/* An empty half hour, as a link. This is what makes "click a time to
305 * create an event" work with no JavaScript: 48 ordinary links per day,
306 * each with a screen-reader label naming its time. */
307[cal-slot] {
308 display: block;
309 inset-inline: 0;
310 position: absolute;
311}
312
313[cal-slot]:hover {
314 background: color-mix(in oklab, var(--rst-accent) 10%, transparent);
315}
316
317[cal-slot]:focus-visible {
318 outline: 2px solid var(--rst-accent);
319 outline-offset: -2px;
320}
321
322/* A placed event. top/height/left/width arrive as inline style from
323 * the server's own packer — rastrillo's CSP allows inline styles, so
324 * this needs no exception. */
325[cal-placed] {
326 position: absolute;
327 z-index: 1;
328}
329
330[cal-placed] [cal-chip] {
331 block-size: 100%;
332 align-items: flex-start;
333 flex-direction: column;
334 gap: 0;
335 white-space: normal;
336}
337
338/* Under an hour there is room for one line, so time and title share
339 * it. Stacked, the title is the second line and the first thing the
340 * chip's own overflow cuts off. */
341[cal-placed~="short"] [cal-chip] {
342 align-items: baseline;
343 flex-direction: row;
344 gap: var(--rst-sp-1);
345 line-height: 1.15;
346 padding-block: 0;
347 white-space: nowrap;
348}
349
350/* The all-day strip above the timed grid. All-day events are not
351 * packed into the column: giving a birthday a height would make it
352 * look like a 24-hour meeting. */
353[cal-allday] {
354 border-block-end: 1px solid var(--rst-line);
355 display: flex;
356 flex-wrap: wrap;
357 gap: var(--rst-sp-1);
358 padding: var(--rst-sp-2);
359}
360
361/* In the week the all-day strip is one ROW of the grid, a cell per
362 * day, so every day's cell is as tall as the busiest one and the
363 * timed columns below all start on the same line. */
364[cal-allday="week"] {
365 align-content: flex-start;
366 border-inline-end: 1px solid var(--rst-line);
367 flex-direction: column;
368 flex-wrap: nowrap;
369 min-inline-size: 0;
370 padding: var(--rst-sp-1);
371}
372
373/* The week's all-day row sticks under the day headings. The grid opens
374 * scrolled to working hours, and a row that scrolled away with midnight
375 * hid every all-day event from the first screen. */
376[cal-allday="week"], [cal-allday-label] {
377 background: var(--rst-bg);
378 position: sticky;
379 top: var(--cal-week-head-size);
380 z-index: 2;
381}
382
383[cal-allday-label] {
384 border-block-end: 1px solid var(--rst-line);
385 border-inline-end: 1px solid var(--rst-line);
386 color: var(--rst-text-faint);
387 font-size: var(--rst-fs-xs);
388 padding: var(--rst-sp-1) var(--rst-sp-2) 0 0;
389 text-align: end;
390}
391
392/* ── The whisper ───────────────────────────────────────────────── */
393
394/* An event authored in another zone. The primary time is always the
395 * reader's own; this is a note beside it, never the headline. */
396[cal-elsewhere] {
397 color: var(--rst-text-faint);
398 font-size: var(--rst-fs-xs);
399}
400
401/* ── Narrow screens ────────────────────────────────────────────── */
402
403/* At 320px the month reflows to a stacked list of days. A seven-column
404 * grid at that width is seven columns of nothing.
405 *
406 * Week keeps its two dimensions and scrolls sideways: a week view IS a
407 * two-dimensional comparison, and flattening it to a list makes it the
408 * agenda, which already exists. */
409@media (max-width: 40rem) {
410 [cal-month], [cal-month] thead { display: block; }
411 [cal-month] thead { display: none; }
412 [cal-month] tbody, [cal-month] tr { display: block; }
413 [cal-month] td { display: block; height: auto; min-height: 2.5rem; }
414 /* A day with nothing in it is not worth a row of its own on a
415 * phone. */
416 [cal-month] td:not(:has([cal-chip])):not(:has([cal-day-num~="today"])) { display: none; }
417 [cal-day-cell] { flex-direction: row; align-items: baseline; gap: var(--rst-sp-2); }
418
419 [cal-week-scroll] { overflow-x: auto; }
420 [cal-week-grid] { min-inline-size: 48rem; }
421}
422
423/* ── Motion ────────────────────────────────────────────────────── */
424
425@media (prefers-reduced-motion: reduce) {
426 [cal-slot], [cal-chip] { transition: none; }
427}
428
429/* ── Quick add ─────────────────────────────────────────────────── */
430
431/* The header's action group. Quick add sits beside New event rather
432 * than replacing it: one is the fast path, the other is the one that
433 * shows every field. */
434[cal-header-actions] {
435 align-items: center;
436 display: flex;
437 flex-wrap: wrap;
438 gap: var(--rst-sp-2);
439}
440
441/* The disclosure is a <details>, so it opens with no script at all.
442 * Everything below is appearance; none of it is behaviour. */
443[cal-quick] { position: relative; }
444
445/* The closed state reads as a small text input, because that is what it
446 * behaves like — click it and type. The marker is removed in both
447 * spellings: Safari still wants the -webkit- pseudo-element and leaving
448 * it in puts a disclosure triangle inside what looks like a field. */
449[cal-quick] > summary {
450 align-items: center;
451 background: var(--rst-surface);
452 border: 1px solid var(--rst-line);
453 border-radius: var(--rst-radius-sm);
454 color: var(--rst-text-muted);
455 cursor: text;
456 display: flex;
457 font-size: var(--rst-fs-sm);
458 gap: var(--rst-sp-1);
459 list-style: none;
460 min-width: 12rem;
461 padding: var(--rst-sp-2) var(--rst-sp-3);
462}
463
464[cal-quick] > summary::-webkit-details-marker { display: none; }
465
466[cal-quick] > summary:hover { border-color: var(--rst-accent); }
467
468[cal-quick][open] > summary {
469 border-color: var(--rst-accent);
470 color: var(--rst-text);
471}
472
473/* The popover. Absolute so opening it does not push the calendar down
474 * the page — the grid behind stays exactly where it was, which is what
475 * makes this feel like a panel rather than a page change. */
476[cal-quick-form] {
477 background: var(--rst-surface);
478 border: 1px solid var(--rst-line);
479 /* A float, so the suite's float radius and shadow (estilo menu.css;
480 * shared-chrome spec §11), not a hand-built 6px and shadow of its own. */
481 border-radius: var(--estilo-float-radius);
482 box-shadow: var(--rst-shadow-pop);
483 /* Border-box, here and on the textarea below: both are width: 100%
484 * on a phone, and content-box added the padding and border on top,
485 * so the open panel ran ~15px past the right edge at 390px and the
486 * page scrolled sideways. TestQuickAddOnANarrowScreen (make browser)
487 * measures it. */
488 box-sizing: border-box;
489 /* Anchored to the END edge, so the panel opens back across the page
490 * instead of off the side of it. The box sits at the far right of the
491 * header, beside New event: anchored at the start edge a 30rem panel
492 * hangs ~28px past a 1280px viewport, which every string assertion in
493 * the Go suite happily passes. The browser gate measured it. */
494 inset-inline-end: 0;
495 margin-block-start: var(--rst-sp-1);
496 padding: var(--rst-sp-3);
497 position: absolute;
498 top: 100%;
499 width: min(30rem, 88vw);
500 z-index: 30;
501}
502
503[cal-quick-text] {
504 background: var(--rst-bg);
505 border: 1px solid var(--rst-line);
506 border-radius: var(--rst-radius-sm);
507 box-sizing: border-box;
508 color: var(--rst-text);
509 display: block;
510 font: inherit;
511 padding: var(--rst-sp-2);
512 resize: vertical;
513 width: 100%;
514}
515
516/* iOS zooms the page into any text control under 16px, and tokens.css
517 * brings controls up to 16px where the pointer is coarse. The box above
518 * sets `font: inherit` with a selector that outweighs tokens.css's bare
519 * `textarea`, and fell back to 14px. Same rule, same max(), restated
520 * here at its weight. TestNoZoomOnTap (make browser) measures it. */
521@media (pointer: coarse) {
522 [cal-quick-text] {
523 font-size: max(1rem, 1em);
524 }
525}
526
527[cal-quick-pane] {
528 background: var(--rst-surface-2);
529 border-radius: var(--rst-radius-sm);
530 font-size: var(--rst-fs-sm);
531 margin-block: var(--rst-sp-2);
532 padding: var(--rst-sp-2) var(--rst-sp-3);
533}
534
535[cal-quick-blank] { color: var(--rst-text-muted); margin: 0; }
536
537[cal-quick-detail] { margin: 0; }
538
539[cal-quick-row] {
540 display: grid;
541 gap: var(--rst-sp-2);
542 grid-template-columns: 8rem 1fr;
543 padding-block: var(--rst-sp-1);
544}
545
546[cal-quick-row] dt { color: var(--rst-text-muted); margin: 0; }
547[cal-quick-row] dd { margin: 0; }
548
549/* The caveat rides in the LABEL. Somebody who reads only the left
550 * column still learns that nothing was emailed. */
551[cal-quick-caveat] { color: var(--rst-text-faint); font-size: var(--rst-fs-xs); }
552
553[cal-quick-people] { list-style: none; margin: 0; padding: 0; }
554
555[cal-quick-notes] {
556 color: var(--rst-text-muted);
557 font-size: var(--rst-fs-xs);
558 margin: var(--rst-sp-2) 0 0;
559 padding-inline-start: var(--rst-sp-4);
560}
561
562[cal-quick-actions] {
563 align-items: center;
564 display: flex;
565 flex-wrap: wrap;
566 gap: var(--rst-sp-2);
567}
568
569[cal-quick-hint] {
570 color: var(--rst-text-faint);
571 font-size: var(--rst-fs-xs);
572 flex: 1 1 12rem;
573}
574
575/* Narrow: the popover stops floating and becomes part of the page. A
576 * 30rem panel pinned to a header on a 320px screen is off the side of
577 * it. */
578@media (max-width: 40rem) {
579 [cal-header-actions] { width: 100%; }
580 [cal-quick] { flex: 1 1 100%; }
581 [cal-quick] > summary { min-width: 0; }
582 [cal-quick-form] {
583 box-shadow: none;
584 position: static;
585 width: 100%;
586 }
587 [cal-quick-row] { grid-template-columns: 1fr; gap: 0; }
588}
589
590/* The keyboard hint. Revealed by quickadd.js, never by the template:
591 * with no script Enter is just a newline, and advertising a shortcut
592 * the page cannot honour is worse than staying quiet. */
593[cal-quick-key] {
594 color: var(--rst-text-faint);
595 font-size: var(--rst-fs-xs);
596}
597
598/* ── Booking pages, the host's side ─────────────────────────────── */
599
600[cal-book-pane] {
601 background: var(--rst-surface-2);
602 border-radius: var(--rst-radius-sm);
603 font-size: var(--rst-fs-sm);
604 margin-block: var(--rst-sp-2) var(--rst-sp-4);
605 padding: var(--rst-sp-2) var(--rst-sp-3);
606}
607
608[cal-book-blank] { color: var(--rst-text-muted); margin: 0; }
609
610[cal-book-lines] { margin: 0; padding-inline-start: var(--rst-sp-4); }
611
612/* Problems first, and unmistakably: the sentence cannot be saved while
613 * one stands. */
614[cal-book-problems] {
615 color: var(--rst-tone-negative-fg);
616 margin: 0 0 var(--rst-sp-2);
617 padding-inline-start: var(--rst-sp-4);
618}
619
620[cal-book-page-body] { padding: var(--rst-sp-3); }
621
622[cal-book-url] { font-size: var(--rst-fs-sm); overflow-wrap: anywhere; }
623
624[cal-book-page-actions] {
625 align-items: flex-start;
626 display: flex;
627 flex-wrap: wrap;
628 gap: var(--rst-sp-3);
629 margin-block-start: var(--rst-sp-3);
630}
631
632/* The publish sentence sits above its own button and nowhere else. */
633[cal-book-caveat] {
634 color: var(--rst-text-muted);
635 font-size: var(--rst-fs-xs);
636 margin: 0 0 var(--rst-sp-2);
637 max-width: 40rem;
638}
639
640[cal-booked-when] { margin: 0; }
641
642/* ── Booking, the stranger's side ────────────────────────────────── */
643
644[cal-book-zone-form] {
645 align-items: center;
646 display: flex;
647 flex-wrap: wrap;
648 gap: var(--rst-sp-2);
649}
650
651[cal-book-days] { list-style: none; margin: 0; padding: 0; }
652[cal-book-days] li { padding-block: var(--rst-sp-1); }
653[cal-book-days] small { color: var(--rst-text-muted); margin-inline-start: var(--rst-sp-2); }
654
655/* Each slot is its own form: a button that posts an instant. */
656[cal-book-slots] {
657 display: flex;
658 flex-wrap: wrap;
659 gap: var(--rst-sp-2);
660}
661
662[cal-book-details] { padding: var(--rst-sp-3); }
663
664[cal-book-manage-actions] {
665 align-items: center;
666 display: flex;
667 flex-wrap: wrap;
668 gap: var(--rst-sp-2);
669}
670
671/* The booker's closing row (rastrillo's form-foot, reached through our
672 * own form's attribute: this file names no rst- selector). form-foot
673 * draws its buttons at the lg size, and on a phone "Hold this time" and
674 * "Pick another time" no longer fit side by side; without wrap the row
675 * squeezes them into two- and three-line labels. Wrapping puts the
676 * second button on a row of its own instead.
677 * TestFormFootOnANarrowScreen (make browser) measures it. */
678[cal-book-details] > div:has(> button[type="submit"]) {
679 flex-wrap: wrap;
680}
681
682/* ── Layout that used to be style attributes ──────────────────────────
683 * rastrillo's CSP (fb806a2) refuses style attributes by default. These
684 * were constant, so they live here; what is still an attribute is a
685 * per-event or per-calendar value (serving.go says which, and why the
686 * policy keeps 'unsafe-inline' for them). */
687[cal-day-chips] {
688 display: flex;
689 flex-direction: column;
690 gap: var(--rst-sp-1);
691 padding: var(--rst-sp-3);
692}
693[cal-box-body] { padding: var(--rst-sp-3); }
694[cal-reminder] {
695 display: flex;
696 align-items: center;
697 gap: var(--rst-sp-2);
698}
699/* In-app reminders (/reminders): the row's Dismiss is the row action
700 itself, its form only carrying it, and Dismiss all sits clear of the
701 list. */
702[cal-notice-dismiss] {
703 display: contents;
704}
705[cal-notice-dismiss] > button {
706 cursor: pointer;
707 font: inherit;
708 font-size: var(--rst-fs-sm);
709}
710[cal-reminder-add] {
711 display: flex;
712 align-items: flex-end;
713 gap: var(--rst-sp-2);
714 margin-top: var(--rst-sp-3);
715}
716/* A calendar's swatch on the Calendars list: its hue, the one value the
717 * attribute still carries. */
718[cal-dot] {
719 background: hsl(var(--cal-hue, 220) 55% 45%);
720 border-radius: var(--rst-radius-pill);
721 inline-size: 12px;
722 block-size: 12px;
723}
724