oficina / slides Public

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

Plain git — no account needed to clone.

Download

Download this file

1/* shell.css — the slide between the index and a page on a phone, for
2 the sidebar, console and one-row topbar shells (the topbar's index
3 is /menu), the only layouts that link it.
4
5 It is a file of its own because the opt-in cannot be scoped: written
6 in tokens.css, @view-transition would opt every page of every shell
7 into cross-document transitions at narrow widths, the sign-in page
8 included. Both documents must opt in, and a stylesheet only these
9 three shells link is exactly that set. A 1.3 topbar layout does not
10 link it, and keeps navigating without a slide. Delete it (and its <link>) and
11 navigation is instant; nothing else changes.
12
13 shell.js types each transition "forward" or "back" in pagereveal.
14 Each :active-view-transition-type() selector is a rule of its own: an
15 engine that does not know the pseudo-class drops the whole rule, and a
16 co-listed selector would take its neighbours with it (the trap the
17 console's rules in tokens.css record). The slide is a physical
18 translateX, so a right-to-left page has four rules of its own that
19 slide the other way. Under reduced motion nothing opts in and
20 navigation is instant; the block at the end sets every animation here
21 to none as well, which is the form the motion gate reads. */
22@media (max-width: 799.98px) and (prefers-reduced-motion: no-preference) {
23 @view-transition { navigation: auto; }
24 ::view-transition-group(root) { animation-duration: 0.32s; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); }
25 html:active-view-transition-type(forward)::view-transition-old(root) { animation: 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both rst-shell-out-start; }
26 html:active-view-transition-type(forward)::view-transition-new(root) { animation: 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both rst-shell-in-end; }
27 html:active-view-transition-type(back)::view-transition-old(root) { animation: 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both rst-shell-out-end; z-index: 1; }
28 html:active-view-transition-type(back)::view-transition-new(root) { animation: 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both rst-shell-in-start; }
29 html[dir="rtl"]:active-view-transition-type(forward)::view-transition-old(root) { animation: 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both rst-shell-out-start-rtl; }
30 html[dir="rtl"]:active-view-transition-type(forward)::view-transition-new(root) { animation: 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both rst-shell-in-end-rtl; }
31 html[dir="rtl"]:active-view-transition-type(back)::view-transition-old(root) { animation: 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both rst-shell-out-end-rtl; z-index: 1; }
32 html[dir="rtl"]:active-view-transition-type(back)::view-transition-new(root) { animation: 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both rst-shell-in-start-rtl; }
33 /* The console's bar holds still while the page under it slides. */
34 .rst-shell-console > .rst-shell__bar, [rst-shell-console] > [rst-shell-bar] { view-transition-name: rst-shell-bar; }
35}
36@keyframes rst-shell-in-end { from { transform: translateX(100%); } }
37@keyframes rst-shell-out-start { to { opacity: 0.7; transform: translateX(-25%); } }
38@keyframes rst-shell-in-start { from { opacity: 0.7; transform: translateX(-25%); } }
39@keyframes rst-shell-out-end { to { transform: translateX(100%); } }
40@keyframes rst-shell-in-end-rtl { from { transform: translateX(-100%); } }
41@keyframes rst-shell-out-start-rtl { to { opacity: 0.7; transform: translateX(25%); } }
42@keyframes rst-shell-in-start-rtl { from { opacity: 0.7; transform: translateX(25%); } }
43@keyframes rst-shell-out-end-rtl { to { transform: translateX(-100%); } }
44@media (prefers-reduced-motion: reduce) {
45 html:active-view-transition-type(forward)::view-transition-old(root) { animation: none; }
46 html:active-view-transition-type(forward)::view-transition-new(root) { animation: none; }
47 html:active-view-transition-type(back)::view-transition-old(root) { animation: none; }
48 html:active-view-transition-type(back)::view-transition-new(root) { animation: none; }
49 html[dir="rtl"]:active-view-transition-type(forward)::view-transition-old(root) { animation: none; }
50 html[dir="rtl"]:active-view-transition-type(forward)::view-transition-new(root) { animation: none; }
51 html[dir="rtl"]:active-view-transition-type(back)::view-transition-old(root) { animation: none; }
52 html[dir="rtl"]:active-view-transition-type(back)::view-transition-new(root) { animation: none; }
53}
54