create-disposabl-app 0.14.18 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -1
- package/dist/disposabl.js +357 -50
- package/dist/index.js +8973 -154
- package/dist/templates/default/.github/scripts/macos-release.sh +81 -0
- package/dist/templates/default/.github/scripts/platforms.sh +1 -1
- package/dist/templates/default/.github/scripts/release.sh +1 -1
- package/dist/templates/default/.github/workflows/pipeline.yml +14 -3
- package/dist/templates/default/apps/desktop/README.md +13 -2
- package/dist/templates/default/apps/desktop/forge.config.mts +9 -3
- package/dist/templates/default/apps/docs/content/getting-started.mdx +1 -1
- package/dist/templates/default/apps/mobile/package.json +1 -0
- package/dist/templates/default/apps/web/eslint.config.ts +5 -1
- package/dist/templates/default/apps/web/public/disposabl-logo-light.svg +8 -0
- package/dist/templates/default/apps/web/public/landing/coast.jpg +0 -0
- package/dist/templates/default/apps/web/public/landing/community.jpg +0 -0
- package/dist/templates/default/apps/web/public/landing/stores/app-store.svg +46 -0
- package/dist/templates/default/apps/web/public/landing/stores/google-play.png +0 -0
- package/dist/templates/default/apps/web/public/landing/taste/LICENSE +21 -0
- package/dist/templates/default/apps/web/public/landing/taste/init.js +3 -0
- package/dist/templates/default/apps/web/public/landing/taste/moments/lib.js +189 -0
- package/dist/templates/default/apps/web/public/landing/taste/moments/moments.js +109 -0
- package/dist/templates/default/apps/web/public/landing/taste/moments/word-highlight/moment.css +8 -0
- package/dist/templates/default/apps/web/public/landing/taste/moments/word-highlight/moment.js +35 -0
- package/dist/templates/default/apps/web/public/landing/taste/motion/motion.css +321 -0
- package/dist/templates/default/apps/web/public/landing/taste/motion/motion.js +406 -0
- package/dist/templates/default/apps/web/routes.config.ts +14 -0
- package/dist/templates/default/apps/web/src/router/__root.tsx +8 -2
- package/dist/templates/default/apps/web/tsr.config.json +1 -1
- package/dist/templates/default/apps/web/vite.config.ts +10 -2
- package/dist/templates/default/bun.lock +6 -0
- package/dist/templates/default/bunfig.toml +1 -0
- package/dist/templates/default/disposabl.json +1 -1
- package/dist/templates/default/packages/backend/convex/authSetup.ts +2 -5
- package/dist/templates/default/packages/backend/convex/billing.ts +5 -0
- package/dist/templates/default/packages/backend/convex/billingHandoff.ts +6 -0
- package/dist/templates/default/packages/backend/convex/convex.config.ts +8 -0
- package/dist/templates/default/packages/backend/convex/http.ts +6 -0
- package/dist/templates/default/packages/backend/convex/revenuecat.ts +13 -0
- package/dist/templates/default/packages/backend/convex/schema.ts +44 -0
- package/dist/templates/default/packages/backend/convex/telemetry.ts +41 -5
- package/dist/templates/default/packages/backend/generate.ts +6 -0
- package/dist/templates/default/packages/cli/auth.ts +36 -3
- package/dist/templates/default/packages/cli/build.ts +6 -0
- package/dist/templates/default/packages/cli/client.ts +189 -19
- package/dist/templates/default/packages/cli/errors.ts +18 -0
- package/dist/templates/default/packages/cli/telemetry-build.ts +27 -0
- package/dist/templates/default/packages/cli/telemetry.ts +266 -0
- package/dist/templates/default/packages/disposabl-kit/PAYMENTS.md +23 -5
- package/dist/templates/default/packages/disposabl-kit/client/lib/telemetry.ts +24 -2
- package/dist/templates/default/packages/disposabl-kit/client/lib/theme.ts +1 -0
- package/dist/templates/default/packages/disposabl-kit/client/routes/billing-login.tsx +92 -0
- package/dist/templates/default/packages/disposabl-kit/client/routes/pricing.tsx +113 -43
- package/dist/templates/default/packages/disposabl-kit/client/routes/route.tsx +13 -5
- package/dist/templates/default/packages/disposabl-kit/client/vite.config.ts +3 -2
- package/dist/templates/default/packages/disposabl-kit/lib/telemetry.ts +148 -12
- package/dist/templates/default/packages/disposabl-kit/mobile/billing/account-billing.tsx +143 -40
- package/dist/templates/default/packages/disposabl-kit/mobile/billing/paywall.ts +83 -0
- package/dist/templates/default/packages/disposabl-kit/mobile/billing/policy.ts +125 -0
- package/dist/templates/default/packages/disposabl-kit/mobile/billing/session.ts +31 -3
- package/dist/templates/default/packages/disposabl-kit/mobile/billing/topup.ts +99 -0
- package/dist/templates/default/packages/disposabl-kit/mobile/billing/use-topup.ts +116 -0
- package/dist/templates/default/packages/disposabl-kit/mobile/billing/web-checkout.ts +190 -0
- package/dist/templates/default/packages/disposabl-kit/mobile/layout.tsx +9 -2
- package/dist/templates/default/packages/disposabl-kit/package.json +10 -1
- package/dist/templates/default/packages/disposabl-kit/payments/checkout-attempt.ts +64 -0
- package/dist/templates/default/packages/disposabl-kit/payments/config.ts +16 -3
- package/dist/templates/default/packages/disposabl-kit/server/billing-functions.ts +218 -9
- package/dist/templates/default/packages/disposabl-kit/server/billing-handoff.ts +126 -0
- package/dist/templates/default/packages/disposabl-kit/server/billing-native-capability.ts +12 -0
- package/dist/templates/default/packages/disposabl-kit/server/billing-setup.ts +2 -0
- package/dist/templates/default/packages/disposabl-kit/server/billing.ts +31 -0
- package/dist/templates/default/packages/disposabl-kit/server/browser-session.ts +27 -0
- package/dist/templates/default/packages/disposabl-kit/server/lib/telemetry.ts +173 -59
- package/dist/templates/default/packages/disposabl-kit/server/revenuecat-contract.ts +233 -0
- package/dist/templates/default/packages/disposabl-kit/server/revenuecat-functions.ts +554 -0
- package/dist/templates/default/packages/disposabl-kit/server/revenuecat-validator.ts +76 -0
- package/dist/templates/default/packages/reconfigure-skill/SKILL.md +36 -0
- package/dist/templates/default/packages/sdk/README.md +21 -0
- package/dist/templates/default/packages/sdk/src/analytics.ts +102 -0
- package/dist/templates/default/packages/sdk/src/index.ts +2 -0
- package/dist/templates/default/packages/skill/SKILL.md +2 -0
- package/dist/templates/default/packages/skill/references/agent.md +2 -0
- package/dist/templates/default/packages/tests/billing-attempts.test.ts +156 -0
- package/dist/templates/default/packages/tests/billing-handoff.test.ts +116 -0
- package/dist/templates/default/packages/tests/billing-setup.test.ts +4 -3
- package/dist/templates/default/packages/tests/billing.test.ts +48 -4
- package/dist/templates/default/packages/tests/ci-platform-selection.test.ts +54 -0
- package/dist/templates/default/packages/tests/desktop-macos-release.test.ts +226 -0
- package/dist/templates/default/packages/tests/desktop-packaging.test.ts +12 -0
- package/dist/templates/default/packages/tests/flows/seo.e2e.ts +3 -1
- package/dist/templates/default/packages/tests/native-billing.test.ts +417 -0
- package/dist/templates/default/packages/tests/page-telemetry.test.ts +218 -0
- package/dist/templates/default/packages/tests/revenuecat-inbox.test.ts +476 -0
- package/dist/templates/default/packages/tests/sdk-analytics.test.ts +158 -0
- package/dist/templates/default/packages/tests/telemetry.test.ts +272 -55
- package/package.json +1 -1
- package/dist/templates/default/apps/web/src/routeTree.gen.ts +0 -578
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/*
|
|
2
|
+
moments.js - the loader for the page's one or two creative moments (taste-skill, references/moments.md).
|
|
3
|
+
|
|
4
|
+
<section data-moment="pinned-chapters" data-moment-opts='{"hold": 2.4}'>…</section>
|
|
5
|
+
|
|
6
|
+
in system.js: const m = await import(new URL('moments/moments.js', HERE).href); await m.ready;
|
|
7
|
+
on its own: <script type="module" src="assets/moments/moments.js"></script>
|
|
8
|
+
|
|
9
|
+
It finds every [data-moment], links <id>/moment.css, imports <id>/moment.js and calls its default
|
|
10
|
+
export mount(root, opts, lib) -> { destroy }. The page keeps scrolling natively; every moment shows
|
|
11
|
+
its finished state under prefers-reduced-motion, without script, and when its module fails.
|
|
12
|
+
|
|
13
|
+
Mounting is idempotent: an element mounts once however many times mount() or mountAll() is called
|
|
14
|
+
(the mount promise is kept on the element as __momentP, before any await), mountAll(document) is
|
|
15
|
+
one cached promise, and `ready` is that promise: it resolves with the mounted elements. Importing
|
|
16
|
+
this module starts mountAll(document) on its own unless window.__momentsManual is set first.
|
|
17
|
+
|
|
18
|
+
Marks on <html>: .mo-js as soon as this runs (a moment's CSS may hide what it will reveal only under
|
|
19
|
+
.mo-js, and .mo-safe arrives 2.5 s later as a fallback that shows everything); data-moments-ready="n"
|
|
20
|
+
when every moment is mounted (shoot scripts wait for it); data-moments-over="n" when a page holds
|
|
21
|
+
more than two, and data-moments-repeat when an id is used twice (both are faults: one or two a page,
|
|
22
|
+
an id once). A moment whose module fails gets data-moment-failed and the class mo-safe on its own
|
|
23
|
+
element (its CSS shows the finished state at once). The 2.5 s timer and .mo-js can also be set
|
|
24
|
+
earlier by one line in <head>, with modulepreload links for this file, lib.js and the dealt moment:
|
|
25
|
+
<script>document.documentElement.classList.add('mo-js');setTimeout(()=>document.documentElement.classList.add('mo-safe'),2500)</script>
|
|
26
|
+
<link rel="modulepreload" href="assets/moments/moments.js"><link rel="modulepreload" href="assets/moments/lib.js">
|
|
27
|
+
*/
|
|
28
|
+
import * as lib from './lib.js';
|
|
29
|
+
|
|
30
|
+
const BASE = new URL('./', import.meta.url);
|
|
31
|
+
const html = document.documentElement;
|
|
32
|
+
const linked = new Map();
|
|
33
|
+
function css(href) {
|
|
34
|
+
if (!linked.has(href)) {
|
|
35
|
+
const done = [...document.querySelectorAll('link[rel="stylesheet"]')].some(l => l.href === href);
|
|
36
|
+
linked.set(href, done ? Promise.resolve() : new Promise(res => {
|
|
37
|
+
const l = document.createElement('link');
|
|
38
|
+
l.rel = 'stylesheet';
|
|
39
|
+
l.href = href;
|
|
40
|
+
l.onload = l.onerror = () => res();
|
|
41
|
+
document.head.appendChild(l);
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
return linked.get(href);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function mount(el) {
|
|
48
|
+
if (el.__momentP) return el.__momentP;
|
|
49
|
+
const id = el.dataset.moment;
|
|
50
|
+
if (!id) return Promise.resolve(null);
|
|
51
|
+
el.__momentP = (async () => {
|
|
52
|
+
let opts = {};
|
|
53
|
+
try { opts = JSON.parse(el.dataset.momentOpts || '{}'); } catch { console.warn(`moments: bad data-moment-opts on ${id}`); }
|
|
54
|
+
const card = lib.inCard(el);
|
|
55
|
+
const [, mod] = await Promise.all([css(new URL(`${id}/moment.css`, BASE).href), import(new URL(`${id}/moment.js`, BASE).href)]);
|
|
56
|
+
// a moment light enough for a phone says so in its module (export const phone = true: one picture
|
|
57
|
+
// or one line of words, transform, filter or colour, nothing pinned that a phone cannot hold): it runs
|
|
58
|
+
// there too, and only reduced motion and a card keep it still. Every other moment is still on a phone
|
|
59
|
+
const onPhone = mod.phone === true;
|
|
60
|
+
const why = onPhone ? (lib.reduced() ? 'reduced' : '') : lib.stillWhy();
|
|
61
|
+
if (card) { el.dataset.momentStill = 'card'; html.dataset.momentsCard = [html.dataset.momentsCard, id].filter(Boolean).join(' '); console.warn(`moments: ${id} sits in a card; it stays still`); }
|
|
62
|
+
else if (why) el.dataset.momentStill = why;
|
|
63
|
+
const mlib = { ...lib, reduced: () => card || (onPhone ? lib.reduced() : lib.still()) };
|
|
64
|
+
const api = mod.default(el, opts, mlib) || {};
|
|
65
|
+
el.__moment = api;
|
|
66
|
+
el.dataset.momentMounted = '1';
|
|
67
|
+
return api;
|
|
68
|
+
})();
|
|
69
|
+
return el.__momentP;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
let docP = null, resolveReady;
|
|
73
|
+
export const ready = new Promise(r => { resolveReady = r; });
|
|
74
|
+
|
|
75
|
+
export function mountAll(root = document) {
|
|
76
|
+
if (root === document && docP) return docP;
|
|
77
|
+
const p = (async () => {
|
|
78
|
+
html.classList.add('mo-js');
|
|
79
|
+
const els = [...root.querySelectorAll('[data-moment]')].filter(el => !el.parentElement?.closest('[data-moment]'));
|
|
80
|
+
const ids = els.map(el => el.dataset.moment);
|
|
81
|
+
const repeat = ids.filter((id, i) => ids.indexOf(id) !== i);
|
|
82
|
+
if (repeat.length) { html.dataset.momentsRepeat = [...new Set(repeat)].join(' '); console.warn(`moments: an id twice on one page: ${repeat.join(', ')}`); }
|
|
83
|
+
if (ids.length > 2) { html.dataset.momentsOver = String(ids.length); console.warn(`moments: ${ids.length} moments on one page (one or two)`); }
|
|
84
|
+
await Promise.all(els.map(el => mount(el).catch(e => {
|
|
85
|
+
if (!el.dataset.momentFailed) console.warn(`moments: ${el.dataset.moment} failed: ${e.message}`);
|
|
86
|
+
el.dataset.momentFailed = e.message;
|
|
87
|
+
el.classList.add('mo-safe');
|
|
88
|
+
el.classList.remove('is-live'); // the hide rules are written under .is-live and ignore .mo-safe: a failed moment shows as written
|
|
89
|
+
el.classList.add('is-done');
|
|
90
|
+
})));
|
|
91
|
+
if (root === document) html.dataset.momentsReady = String(els.length);
|
|
92
|
+
return els;
|
|
93
|
+
})();
|
|
94
|
+
if (root === document) { docP = p; p.then(resolveReady, () => resolveReady([])); }
|
|
95
|
+
return p;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function unmountAll(root = document) {
|
|
99
|
+
root.querySelectorAll('[data-moment-mounted]').forEach(el => { try { el.__moment?.destroy?.(); } catch { /* gone */ } delete el.__moment; delete el.__momentP; el.removeAttribute('data-moment-mounted'); });
|
|
100
|
+
if (root === document) docP = null;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
html.classList.add('mo-js');
|
|
104
|
+
setTimeout(() => html.classList.add('mo-safe'), 2500);
|
|
105
|
+
const start = () => { if (!window.__momentsManual) mountAll(document); };
|
|
106
|
+
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', start, { once: true });
|
|
107
|
+
else start();
|
|
108
|
+
|
|
109
|
+
export default { mount, mountAll, unmountAll, ready, lib };
|
package/dist/templates/default/apps/web/public/landing/taste/moments/word-highlight/moment.css
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/* word-highlight: the statement in the display face; each word rests at half ink on the ground and turns to ink when
|
|
2
|
+
the scroll reaches it, a <strong> word to the accent. Without script every word is ink. */
|
|
3
|
+
.mo-wh__text, [data-moment="word-highlight"] > .container > p { font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--t-h2); line-height: 1.16; letter-spacing: var(--display-tracking); max-width: 960px; text-wrap: pretty; }
|
|
4
|
+
.mo-wh .mo-w { color: color-mix(in oklab, var(--ink) 50%, var(--bg)); transition: color 160ms ease; }
|
|
5
|
+
.mo-wh .mo-w.is-on { color: var(--ink); }
|
|
6
|
+
.mo-wh strong { font-weight: inherit; }
|
|
7
|
+
.mo-wh strong .mo-w.is-on { color: var(--accent); }
|
|
8
|
+
@media (prefers-reduced-motion: reduce) { .mo-wh .mo-w { color: var(--ink); transition: none; } .mo-wh strong .mo-w { color: var(--accent); } }
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
word-highlight - one statement's words turn from grey to ink, word by word, as the statement crosses
|
|
3
|
+
the middle of the screen. Scrubbed to the scrollbar (it runs back when the visitor scrolls up); a
|
|
4
|
+
<strong> word turns to the accent instead of the ink. For the one statement a page stands on, 12 to
|
|
5
|
+
40 words, on its own ground or beside one picture.
|
|
6
|
+
|
|
7
|
+
<section class="section" data-moment="word-highlight">
|
|
8
|
+
<div class="container"><p class="mo-wh__text">Give tasks to <strong>Relay</strong> like a teammate …</p></div>
|
|
9
|
+
</section>
|
|
10
|
+
|
|
11
|
+
opts: from 0.85 (the statement's top at this share of the screen's height turns the first word),
|
|
12
|
+
to 0.45 (its bottom at this share turns the last).
|
|
13
|
+
Reduced motion, no script: the whole statement in ink. It runs on a phone too (one paragraph's
|
|
14
|
+
colours, no layout, no pin).
|
|
15
|
+
*/
|
|
16
|
+
export const phone = true;
|
|
17
|
+
export default function (root, opts, lib) {
|
|
18
|
+
const text = root.matches('p, h2, h3, blockquote') ? root : (root.querySelector('.mo-wh__text') || [...root.querySelectorAll('p, h2, h3, blockquote')].find(p => !p.matches('.t-label, .t-small, .muted')));
|
|
19
|
+
if (!text) return {};
|
|
20
|
+
root.classList.add('mo-wh');
|
|
21
|
+
const words = lib.split(text, 'words').map(i => i.parentElement);
|
|
22
|
+
if (lib.reduced()) { words.forEach(w => w.classList.add('is-on')); root.classList.add('is-done'); return {}; }
|
|
23
|
+
const from = opts.from ?? 0.85, to = opts.to ?? 0.45;
|
|
24
|
+
let n = -1;
|
|
25
|
+
const s = lib.scrub(text, (p, r) => {
|
|
26
|
+
const vh = innerHeight, start = vh * from, end = vh * to;
|
|
27
|
+
const t = lib.clamp((start - r.top) / Math.max(1, (start - end) + r.height));
|
|
28
|
+
const atEnd = innerHeight + scrollY >= document.documentElement.scrollHeight - 2; // page bottom: it can climb no further, the statement stands in full ink
|
|
29
|
+
const k = atEnd ? words.length : Math.round(t * words.length);
|
|
30
|
+
if (k === n) return;
|
|
31
|
+
n = k;
|
|
32
|
+
words.forEach((w, i) => w.classList.toggle('is-on', i < k));
|
|
33
|
+
}, { mode: 'view' });
|
|
34
|
+
return { destroy: s.destroy };
|
|
35
|
+
}
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
/*
|
|
2
|
+
taste-skill motion.css - the micro-interactions a company site has (figma.com, x.ai): one small
|
|
3
|
+
opt-in layer over system.css and ui/cards.css. Link it after them (data-motion on <html> is optional);
|
|
4
|
+
load motion.js once (it adds the tab indicator, the number tick and the card loops).
|
|
5
|
+
The layer is ON as soon as this file is linked: no attribute is needed (a hover shot of a linked card or photo
|
|
6
|
+
shows the 2px lift and the 1.03 zoom). <html data-motion="off"> switches the whole layer off; data-motion="live"
|
|
7
|
+
is the number tick in a headless shot (motion.js).
|
|
8
|
+
references/motion.md says what moves and how fast. Everything here answers the pointer, the
|
|
9
|
+
keyboard or a number coming into view once, plus the hero's one entrance on load (the end of this
|
|
10
|
+
file); nothing moves because the page scrolled (that is a dealt moment's job, assets/moments).
|
|
11
|
+
|
|
12
|
+
Hover moves sit under (hover: hover) and (pointer: fine): a phone never keeps a stuck hover.
|
|
13
|
+
Hover out runs 120ms against 150ms in (motion.md, tokens).
|
|
14
|
+
Under prefers-reduced-motion colours still change and a press still shows; nothing moves or scales.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
:root {
|
|
18
|
+
--m-in: 150ms; /* hover in: buttons, links, nav, tabs */
|
|
19
|
+
--m-out: 120ms; /* hover out */
|
|
20
|
+
--m-press: 90ms; /* a press */
|
|
21
|
+
--m-panel: 200ms; /* a menu or sheet opening */
|
|
22
|
+
--m-close: 120ms; /* a menu closing */
|
|
23
|
+
--m-slide: 240ms; /* an indicator travelling between two tabs or links */
|
|
24
|
+
--m-image: 600ms; /* a photograph scaling inside its mask */
|
|
25
|
+
--m-image-out: 400ms; /* ...and settling back */
|
|
26
|
+
--m-ease: var(--ease, cubic-bezier(.2, .8, .2, 1)); /* the one UI ease-out (system.css --ease): fast start, soft landing */
|
|
27
|
+
--m-ease-io: cubic-bezier(.65, 0, .35, 1); /* the indicator: leaves and lands softly */
|
|
28
|
+
--m-ease-enter: cubic-bezier(.22, 1, .36, 1); /* an entrance settling: long soft tail, never past its mark */
|
|
29
|
+
--m-cycle: 3.2s; /* one cycle of a card's loop (2.5-4 s) */
|
|
30
|
+
--m-lift: -2px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* ---------------------------------------------------------------- buttons */
|
|
34
|
+
html:not([data-motion="off"]) .btn {
|
|
35
|
+
position: relative;
|
|
36
|
+
transition: background-color var(--m-out) var(--m-ease), color var(--m-out) var(--m-ease),
|
|
37
|
+
border-color var(--m-out) var(--m-ease), box-shadow var(--m-out) var(--m-ease),
|
|
38
|
+
transform var(--m-press) var(--m-ease);
|
|
39
|
+
}
|
|
40
|
+
/* the tone moves toward the ground: a black button greys a little on white, a white one on black */
|
|
41
|
+
html:not([data-motion="off"]) .btn--primary:hover { background: color-mix(in oklab, var(--action) 84%, var(--bg)); }
|
|
42
|
+
html:not([data-motion="off"]) .btn--secondary:hover {
|
|
43
|
+
background: color-mix(in oklab, var(--bg) 92%, var(--ink));
|
|
44
|
+
border-color: color-mix(in oklab, var(--ink) 32%, transparent);
|
|
45
|
+
}
|
|
46
|
+
html:not([data-motion="off"]) .btn:hover { transition-duration: var(--m-in), var(--m-in), var(--m-in), var(--m-in), var(--m-press); }
|
|
47
|
+
html:not([data-motion="off"]) .btn:active { transform: translateY(1px) scale(.985); }
|
|
48
|
+
/* the step: a button rises 1px on hover (2px on the large size) and presses 1px down with a 1.5% shrink on
|
|
49
|
+
click; pointer only. The text-link secondary (arrow and block looks) keeps its underline and does not step.
|
|
50
|
+
Reduced motion keeps the colour change only (see the end of this file). */
|
|
51
|
+
@media (hover: hover) and (pointer: fine) {
|
|
52
|
+
html:not([data-motion="off"]) .btn:hover { transform: translateY(-1px); }
|
|
53
|
+
html:not([data-motion="off"]) .btn--xl:hover { transform: translateY(-2px); }
|
|
54
|
+
html:not([data-motion="off"]):is([data-buttons="arrow"], [data-buttons="block"]) .btn--secondary:hover { transform: none; }
|
|
55
|
+
html:not([data-motion="off"]) .btn:active { transform: translateY(1px) scale(.985); }
|
|
56
|
+
html:not([data-motion="off"]):is([data-buttons="arrow"], [data-buttons="block"]) .btn--secondary:active { transform: scale(.985); }
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* the arrow: the text arrow (.btn--arrow, .link) nudges 3px; the drawn arrow (.m-arrow) grows its
|
|
60
|
+
stem and moves its head 3px, the way a good product site's "Learn more" does. The pointer's move
|
|
61
|
+
only for a fine pointer; keyboard focus shows it anywhere */
|
|
62
|
+
html:not([data-motion="off"]) :is(.btn--arrow, .link)::after { transition: transform var(--m-out) var(--m-ease); }
|
|
63
|
+
html:not([data-motion="off"]) :is(.btn--arrow, .link):focus-visible::after { transform: translateX(3px); transition-duration: var(--m-in); }
|
|
64
|
+
.m-arrow { width: 12px; height: 12px; flex: none; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.6;
|
|
65
|
+
stroke-linecap: round; stroke-linejoin: round; }
|
|
66
|
+
.m-arrow__stem { opacity: 0; transform: scaleX(.2); transform-origin: 1px 50%; transform-box: fill-box;
|
|
67
|
+
transition: opacity var(--m-out) var(--m-ease), transform var(--m-out) var(--m-ease); }
|
|
68
|
+
.m-arrow__head { transition: transform var(--m-out) var(--m-ease); }
|
|
69
|
+
:is(a, button):focus-visible > .m-arrow .m-arrow__stem { opacity: 1; transform: none; transition-duration: var(--m-in); }
|
|
70
|
+
:is(a, button):focus-visible > .m-arrow .m-arrow__head { transform: translateX(3px); transition-duration: var(--m-in); }
|
|
71
|
+
@media (hover: hover) and (pointer: fine) {
|
|
72
|
+
html:not([data-motion="off"]) :is(.btn--arrow, .link):hover::after { transform: translateX(3px); transition-duration: var(--m-in); }
|
|
73
|
+
:is(a, button):hover > .m-arrow .m-arrow__stem { opacity: 1; transform: none; transition-duration: var(--m-in); }
|
|
74
|
+
:is(a, button):hover > .m-arrow .m-arrow__head { transform: translateX(3px); transition-duration: var(--m-in); }
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* a pill that is a link (the line above a hero headline) */
|
|
78
|
+
html:not([data-motion="off"]) a.pill { transition: background-color var(--m-out) var(--m-ease), border-color var(--m-out) var(--m-ease); }
|
|
79
|
+
html:not([data-motion="off"]) a.pill:hover { background: color-mix(in oklab, var(--card) 90%, var(--ink)); border-color: var(--line-strong); transition-duration: var(--m-in); }
|
|
80
|
+
|
|
81
|
+
/* ---------------------------------------------------------------- links: an underline that draws */
|
|
82
|
+
/* .link and links in running text: a rest line, and the ink line draws left to right on hover and
|
|
83
|
+
leaves to the right. A link in a sentence rests on its own colour at 45% (about 3.3:1 on its
|
|
84
|
+
ground), so it reads as a link even when it is the same colour as the text (WCAG 1.4.1); .link
|
|
85
|
+
and .m-link carry an arrow or sit alone and rest on the faint hairline */
|
|
86
|
+
html:not([data-motion="off"]) :is(.link, .m-link, p a:not([class]), .footer ul a, .footer .link) {
|
|
87
|
+
text-decoration: none;
|
|
88
|
+
background-image: linear-gradient(currentColor, currentColor), linear-gradient(var(--m-rest, var(--line-strong)), var(--m-rest, var(--line-strong)));
|
|
89
|
+
background-repeat: no-repeat; background-size: 0% 1px, 100% 1px;
|
|
90
|
+
background-position: right 0 bottom 0, 0 100%;
|
|
91
|
+
transition: background-size var(--m-out) var(--m-ease), color var(--m-out) var(--m-ease);
|
|
92
|
+
padding-bottom: 2px;
|
|
93
|
+
}
|
|
94
|
+
/* set on its own rule: the shared rule above is (0,3,1) through :is(.footer .link) and would win */
|
|
95
|
+
html:not([data-motion="off"]) p a:not([class]) { --m-rest: color-mix(in oklab, currentColor 45%, transparent); }
|
|
96
|
+
html:not([data-motion="off"]) :is(.footer ul a, .m-link--bare):not(:hover, :focus-visible) { background-size: 0% 1px, 0% 1px; }
|
|
97
|
+
html:not([data-motion="off"]) :is(.link, .m-link, p a:not([class]), .footer ul a, .footer .link):is(:hover, :focus-visible) {
|
|
98
|
+
background-size: 100% 1px, 100% 1px; background-position: left 0 bottom 0, 0 100%; transition-duration: var(--m-in);
|
|
99
|
+
}
|
|
100
|
+
/* the link's arrow is not underlined: the line runs under the words only */
|
|
101
|
+
html:not([data-motion="off"]) .link { background-size: 0% 1px, calc(100% - 1em - var(--s-2)) 1px; }
|
|
102
|
+
html:not([data-motion="off"]) .link:is(:hover, :focus-visible) { background-size: calc(100% - 1em - var(--s-2)) 1px, calc(100% - 1em - var(--s-2)) 1px; }
|
|
103
|
+
html:not([data-motion="off"]) .link, html:not([data-motion="off"]) .link:is(:hover, :focus-visible) { background-position: 0 100%, 0 100%; }
|
|
104
|
+
html:not([data-motion="off"]) .footer ul a:hover { color: var(--ink); }
|
|
105
|
+
|
|
106
|
+
/* ---------------------------------------------------------------- navigation */
|
|
107
|
+
/* the nav words take no pill (ST-08, ST-11): system.css draws the underline under a word from the left on hover and focus, and
|
|
108
|
+
takes it away to the right; the page you are on keeps its still bar (system.css draws it, at the same inset) */
|
|
109
|
+
@media (min-width: 1024px) {
|
|
110
|
+
/* the full-width panel: fades and settles 6px in 200ms with its columns together (one surface, read
|
|
111
|
+
as one); it closes in 120ms. While one menu is open, the next word swaps the panel at once
|
|
112
|
+
(motion.js .m-menu-open) */
|
|
113
|
+
html:not([data-motion="off"]) .nav__menu {
|
|
114
|
+
transform: translateY(-6px);
|
|
115
|
+
transition: opacity var(--m-close) var(--m-ease), transform var(--m-close) var(--m-ease), visibility 0s linear var(--m-close);
|
|
116
|
+
}
|
|
117
|
+
html:not([data-motion="off"]) .nav__item:is(:hover, :focus-within) > .nav__menu {
|
|
118
|
+
transition: opacity var(--m-panel) var(--m-ease) 150ms, transform var(--m-panel) var(--m-ease) 150ms, visibility 0s linear 150ms;
|
|
119
|
+
}
|
|
120
|
+
/* .m-menu-open comes on when the first panel starts to show (150ms): from then the next word swaps
|
|
121
|
+
the panel at once. Duration and delay go to 0, the properties stay listed, so the panel that is
|
|
122
|
+
still fading in finishes its own 200ms instead of snapping */
|
|
123
|
+
html:not([data-motion="off"]) .nav.m-menu-open .nav__menu,
|
|
124
|
+
html:not([data-motion="off"]) .nav.m-menu-open .nav__item:is(:hover, :focus-within) > .nav__menu { transition-duration: 0s; transition-delay: 0s; }
|
|
125
|
+
html:not([data-motion="off"]) .menu-col a { transition: color var(--m-out) var(--m-ease); }
|
|
126
|
+
html:not([data-motion="off"]) .menu-col a:hover { transition-duration: var(--m-in); }
|
|
127
|
+
html:not([data-motion="off"]) .menu-card .panel { transition: border-color var(--m-out) var(--m-ease); }
|
|
128
|
+
}
|
|
129
|
+
/* the phone sheet slides in 8px and fades (system.js opens it) */
|
|
130
|
+
@media (max-width: 1023px) {
|
|
131
|
+
html:not([data-motion="off"]) .nav.is-open .nav__links { transition: opacity var(--m-panel) var(--m-ease), transform var(--m-panel) var(--m-ease); }
|
|
132
|
+
@starting-style { html:not([data-motion="off"]) .nav.is-open .nav__links { opacity: 0; transform: translateY(-8px); } }
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* ---------------------------------------------------------------- tabs: the indicator slides */
|
|
136
|
+
html:not([data-motion="off"]) .tabs.m-has-ind { position: relative; isolation: isolate; }
|
|
137
|
+
html:not([data-motion="off"]) .tabs.m-has-ind .tab { position: relative; z-index: 1; }
|
|
138
|
+
html:not([data-motion="off"]) .tabs.m-has-ind .tab[aria-selected="true"] { background: transparent; border-color: transparent; }
|
|
139
|
+
/* the pill takes its new size at once and travels by transform alone (motion.js: it starts scaled to
|
|
140
|
+
the old tab's size at the old place and settles to scale 1 at the new one), so nothing is laid out
|
|
141
|
+
again while it moves and its corners are true at rest */
|
|
142
|
+
.m-tab-ind {
|
|
143
|
+
position: absolute; left: 0; top: 0; z-index: 0; width: var(--w, 0px); height: var(--h, 0px);
|
|
144
|
+
border-radius: var(--r-btn); background: var(--ink); pointer-events: none;
|
|
145
|
+
transform: translate(var(--x, 0px), var(--y, 0px)) scale(var(--sx, 1), var(--sy, 1)); transform-origin: 0 0;
|
|
146
|
+
transition: transform var(--m-slide) var(--m-ease-io);
|
|
147
|
+
}
|
|
148
|
+
.m-tab-ind.is-jump { transition: none; }
|
|
149
|
+
html:not([data-motion="off"]) .tab { transition: color var(--m-slide) var(--m-ease), border-color var(--m-out) var(--m-ease), background-color var(--m-out) var(--m-ease); }
|
|
150
|
+
|
|
151
|
+
/* ---------------------------------------------------------------- focus */
|
|
152
|
+
/* the ring (system.css) is drawn in full in the frame the focus lands; no transition */
|
|
153
|
+
|
|
154
|
+
/* ---------------------------------------------------------------- cards: a 2px lift */
|
|
155
|
+
/* the card rises 2px, its border and shadow deepen; a card without its own box (.card--open) lifts
|
|
156
|
+
its panel. Never tilts, flips or follows the pointer */
|
|
157
|
+
html:not([data-motion="off"]) .card:not(.card--open, .card--plan) {
|
|
158
|
+
transition: transform var(--m-out) var(--m-ease), border-color var(--m-out) var(--m-ease), box-shadow var(--m-out) var(--m-ease);
|
|
159
|
+
}
|
|
160
|
+
html:not([data-motion="off"]) .card--open > .panel { transition: transform var(--m-out) var(--m-ease), box-shadow var(--m-out) var(--m-ease); }
|
|
161
|
+
@media (hover: hover) and (pointer: fine) {
|
|
162
|
+
html:not([data-motion="off"]) .card:not(.card--open, .card--plan, .m-nolift):hover {
|
|
163
|
+
transform: translateY(var(--m-lift));
|
|
164
|
+
border-color: color-mix(in oklab, var(--ink) 16%, transparent);
|
|
165
|
+
/* the shadow is deeper on a dark card (its lightness l): about .2 on white, .64 on near-black */
|
|
166
|
+
box-shadow: inset 0 1px 0 var(--c-hi, transparent), 0 1px 2px rgb(0 0 0 / .06),
|
|
167
|
+
0 14px 32px -18px oklch(from var(--card, #fff) 0 0 0 / calc(0.75 - l * 0.55));
|
|
168
|
+
transition-duration: 180ms;
|
|
169
|
+
}
|
|
170
|
+
html:not([data-motion="off"]) .card--open:not(.m-nolift):hover > .panel {
|
|
171
|
+
transform: translateY(var(--m-lift)); box-shadow: 0 14px 32px -18px oklch(from var(--bg, #fff) 0 0 0 / calc(0.75 - l * 0.55)); transition-duration: 180ms;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/* ---------------------------------------------------------------- photographs: 1.03 inside the mask */
|
|
176
|
+
/* a photograph in a link or a linked card grows 3% inside its own mask (the frame, the tile, a .m-zoom wrapper);
|
|
177
|
+
the mask clips it, so the box never moves. .m-zoom is the hook for any other photograph: wrap it. */
|
|
178
|
+
.m-zoom { overflow: clip; }
|
|
179
|
+
html:not([data-motion="off"]) :is(.frame__img, .tile__media > img, .m-zoom img, .m-zoom > video) {
|
|
180
|
+
transition: transform var(--m-image-out) var(--m-ease);
|
|
181
|
+
}
|
|
182
|
+
@media (hover: hover) and (pointer: fine) {
|
|
183
|
+
html:not([data-motion="off"]) :is(a, .card:has(a), .m-zoom):hover :is(.frame__img, .tile__media > img),
|
|
184
|
+
html:not([data-motion="off"]) .m-zoom:hover :is(img, video) { transform: scale(1.03); transition-duration: var(--m-image); }
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* ---------------------------------------------------------------- inputs, switches, checks */
|
|
188
|
+
html:not([data-motion="off"]) .field :is(input, select, textarea), .m-input {
|
|
189
|
+
transition: border-color var(--m-out) var(--m-ease), box-shadow var(--m-out) var(--m-ease), background-color var(--m-out) var(--m-ease);
|
|
190
|
+
}
|
|
191
|
+
html:not([data-motion="off"]) .field :is(input, select, textarea):hover, .m-input:hover { border-color: color-mix(in oklab, var(--ink) 48%, transparent); }
|
|
192
|
+
html:not([data-motion="off"]) .field :is(input, select, textarea):focus, .m-input:focus {
|
|
193
|
+
/* the field's own ring in place of the outline: a 2px line in --action (3:1 on the ground) and a soft halo,
|
|
194
|
+
there at once like every focus ring (the hover's fade does not apply to focus) */
|
|
195
|
+
outline: none; border-color: var(--action);
|
|
196
|
+
box-shadow: 0 0 0 1px var(--action), 0 0 0 4px color-mix(in oklab, var(--action) 20%, transparent); transition-duration: 0s;
|
|
197
|
+
}
|
|
198
|
+
/* a switch: <button class="m-switch" role="switch" aria-checked="false" aria-label="..."></button>
|
|
199
|
+
(motion.js flips aria-checked on click unless the page handles it). The knob slides in 180ms and
|
|
200
|
+
stretches 4px while pressed, both by transform (a scaleX from its left edge; on, the 12px shift
|
|
201
|
+
keeps its right edge where it rests). The off track is ink at 48% (3.3:1 or more against the knob
|
|
202
|
+
and the ground, the 3:1 a control needs) */
|
|
203
|
+
.m-switch {
|
|
204
|
+
position: relative; flex: none; width: 40px; height: 24px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
|
|
205
|
+
background: color-mix(in oklab, var(--ink) 48%, var(--bg));
|
|
206
|
+
transition: background-color 180ms var(--m-ease);
|
|
207
|
+
}
|
|
208
|
+
.m-switch::before {
|
|
209
|
+
content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 999px;
|
|
210
|
+
background: var(--bg); box-shadow: 0 1px 3px rgb(0 0 0 / .25);
|
|
211
|
+
transform-origin: 0 50%; transition: transform 180ms var(--m-ease);
|
|
212
|
+
}
|
|
213
|
+
.m-switch[aria-checked="true"] { background: var(--action); }
|
|
214
|
+
.m-switch[aria-checked="true"]::before { transform: translateX(16px); background: var(--action-ink); }
|
|
215
|
+
.m-switch:active::before { transform: scaleX(1.22); transition-duration: var(--m-press); }
|
|
216
|
+
.m-switch[aria-checked="true"]:active::before { transform: translateX(12px) scaleX(1.22); }
|
|
217
|
+
.m-switch:hover:not([aria-checked="true"]) { background: color-mix(in oklab, var(--ink) 58%, var(--bg)); }
|
|
218
|
+
/* a check box: <input type="checkbox" class="m-check">, the tick fades in as it grows from 70% to full size, 160ms */
|
|
219
|
+
.m-check {
|
|
220
|
+
appearance: none; -webkit-appearance: none; flex: none; margin: 0; width: 20px; height: 20px; border-radius: 6px; cursor: pointer;
|
|
221
|
+
border: 1px solid color-mix(in oklab, var(--ink) 48%, var(--bg)); background: var(--bg) no-repeat center / 14px 14px;
|
|
222
|
+
display: inline-grid; place-items: center;
|
|
223
|
+
transition: background-color var(--m-in) var(--m-ease), border-color var(--m-in) var(--m-ease);
|
|
224
|
+
}
|
|
225
|
+
.m-check::before {
|
|
226
|
+
content: ""; width: 10px; height: 6px; margin-top: -2px; border: solid var(--action-ink); border-width: 0 0 2px 2px;
|
|
227
|
+
opacity: 0; transform: rotate(-45deg) scale(.7); transform-origin: 50% 50%;
|
|
228
|
+
transition: transform 160ms var(--m-ease), opacity 100ms var(--m-ease);
|
|
229
|
+
}
|
|
230
|
+
.m-check:hover:not(:checked) { border-color: color-mix(in oklab, var(--ink) 64%, var(--bg)); }
|
|
231
|
+
.m-check:checked { background-color: var(--action); border-color: var(--action); }
|
|
232
|
+
.m-check:checked::before { opacity: 1; transform: rotate(-45deg) scale(1); }
|
|
233
|
+
|
|
234
|
+
/* ---------------------------------------------------------------- FAQ
|
|
235
|
+
Every answer stays open (ST-47, system.css): nothing here opens, closes or animates its height. */
|
|
236
|
+
|
|
237
|
+
/* ---------------------------------------------------------------- numbers that tick once */
|
|
238
|
+
[data-m-count] { font-variant-numeric: tabular-nums; }
|
|
239
|
+
|
|
240
|
+
/* ---------------------------------------------------------------- loops inside a card's panel */
|
|
241
|
+
/* a CSS loop the page writes inside [data-m-loop] runs one cycle in --m-cycle (2.5-4 s) and repeats
|
|
242
|
+
while on screen; motion.js pauses it off screen and restarts it on hover (motion.md) */
|
|
243
|
+
[data-m-loop] { --m-cycle: 3.2s; --m-still: 0.6; --m-safe: 48px; }
|
|
244
|
+
/* the pause button (a 32px disc 12px in from the bottom-right corner) gets a clear band: content in
|
|
245
|
+
the flow ends --m-safe (48px) above the bottom edge, and a fading stage dissolves above that band,
|
|
246
|
+
never under the button. Size the panel so the loop's subject sits above the fade */
|
|
247
|
+
[data-m-loop]:not(:has(> .stage)) { padding-bottom: var(--m-safe); }
|
|
248
|
+
[data-m-loop] > .stage:is(.stage--fade-b, .stage--fade-br) { bottom: var(--m-safe); }
|
|
249
|
+
/* on a phone (as ui.js does) and under reduced motion a loop holds its finished picture: the frame at
|
|
250
|
+
--m-still (0-1) of the cycle, set on the loop where the picture is complete */
|
|
251
|
+
@media (max-width: 639px) {
|
|
252
|
+
[data-m-loop] * { animation-duration: var(--m-cycle) !important; animation-delay: calc(-1 * var(--m-still) * var(--m-cycle)) !important;
|
|
253
|
+
animation-play-state: paused !important; }
|
|
254
|
+
}
|
|
255
|
+
[data-m-loop].is-m-off *, [data-m-loop].is-m-paused * { animation-play-state: paused !important; }
|
|
256
|
+
|
|
257
|
+
/* ---------------------------------------------------------------- the hero's entrance */
|
|
258
|
+
/* Once on load the hero enters (motion.js enter(), motion.md): the h1 line by line out of word masks,
|
|
259
|
+
then its lead, each button and its facts 60ms apart, the picture settling; about 1.1 s.
|
|
260
|
+
Markup: data-enter on the hero <section> and the one head line that sets html.m-enter before the
|
|
261
|
+
first paint (with its 700ms safety mark, m-enter-done). Only the words wait, and only in that window
|
|
262
|
+
until motion.js takes over (.is-entering): no script, reduced motion, print and data-motion="off"
|
|
263
|
+
show the hero as written; a script later than the mark finds the words fading in here.
|
|
264
|
+
The pictures (a photograph, a window, the collage) are never hidden, so nothing blinks or flashes
|
|
265
|
+
the hero's ground: a photograph waits at 1.05 and a window or collage at .98, by the scale property
|
|
266
|
+
(it composes with any transform of their own), and they settle by transition as soon as the
|
|
267
|
+
entrance starts or the mark passes. */
|
|
268
|
+
@media screen and (prefers-reduced-motion: no-preference) {
|
|
269
|
+
html.m-enter:not(.m-enter-done, [data-motion="off"]) .hero[data-enter]:not([data-enter="off"], .is-entering, .is-entered)
|
|
270
|
+
:is(h1, h1 ~ *, :has(> h1) ~ *, :has(~ h1)):not([data-enter-media], .hero__bg, .hero__media, .hero__stage, .hero__art, .hero__window, .hero-visual, .ly-collage,
|
|
271
|
+
:has([data-enter-media], .hero__bg, .hero__media, .hero__stage, .hero__art, .hero__window, .hero-visual, .ly-collage)) { opacity: 0; }
|
|
272
|
+
/* the mark passed before motion.js arrived: the words fade in instead of appearing at once */
|
|
273
|
+
html.m-enter.m-enter-done:not([data-motion="off"]) .hero[data-enter]:not([data-enter="off"], .is-entering, .is-entered)
|
|
274
|
+
:is(h1, h1 ~ *, :has(> h1) ~ *, :has(~ h1)) { transition: opacity 400ms var(--m-ease); }
|
|
275
|
+
/* the settle: a photograph from 1.05 inside its frame (the hero clips one of its own), anything else from .98 */
|
|
276
|
+
html.m-enter:not([data-motion="off"]) .hero[data-enter]:not([data-enter="off"], .is-still)
|
|
277
|
+
:is(:is([data-enter-media], .hero__bg, .hero__media, .hero__stage, .hero__art, .hero__window, .hero-visual, .ly-collage):is(img, picture, video),
|
|
278
|
+
:is([data-enter-media], .hero__bg, .hero__media, .hero__stage, .hero__art, .hero__window, .hero-visual, .ly-collage) > :is(img, picture, video, .frame__img)) {
|
|
279
|
+
transition: scale 1100ms var(--m-ease-enter), clip-path 1100ms var(--m-ease-enter);
|
|
280
|
+
}
|
|
281
|
+
/* the clip's resting value, kept below the waiting rule's weight so that one wins while it applies */
|
|
282
|
+
.hero[data-enter] :is([data-enter-media], .hero__bg, .hero__media, .hero__stage, .hero__art, .hero__window, .hero-visual, .ly-collage):is(img, picture, video) { clip-path: inset(0); }
|
|
283
|
+
html.m-enter:not([data-motion="off"]) .hero[data-enter]:not([data-enter="off"], .is-still)
|
|
284
|
+
:is([data-enter-media], .hero__bg, .hero__media, .hero__stage, .hero__art, .hero__window, .hero-visual, .ly-collage):not(img, picture, video, :has(> :is(img, picture, video, .frame__img))) {
|
|
285
|
+
transition: scale 900ms var(--m-ease-enter);
|
|
286
|
+
}
|
|
287
|
+
html.m-enter:not(.m-enter-done, [data-motion="off"]) .hero[data-enter]:not([data-enter="off"], .is-entering, .is-entered)
|
|
288
|
+
:is(:is([data-enter-media], .hero__bg, .hero__media, .hero__stage, .hero__art, .hero__window, .hero-visual, .ly-collage):is(img, picture, video),
|
|
289
|
+
:is([data-enter-media], .hero__bg, .hero__media, .hero__stage, .hero__art, .hero__window, .hero-visual, .ly-collage) > :is(img, picture, video, .frame__img)) { scale: 1.05; }
|
|
290
|
+
html.m-enter:not(.m-enter-done, [data-motion="off"]) .hero[data-enter]:not([data-enter="off"], .is-entering, .is-entered)
|
|
291
|
+
:is([data-enter-media], .hero__bg, .hero__media, .hero__stage, .hero__art, .hero__window, .hero-visual, .ly-collage):is(img, picture, video) { clip-path: inset(2.381%); } /* a picture that is itself the media (a band under the header, a full-bleed layer) has no frame: its own clip keeps it inside its box while larger, (1 - 1/1.05) / 2 */
|
|
292
|
+
html.m-enter:not(.m-enter-done, [data-motion="off"]) .hero[data-enter]:not([data-enter="off"], .is-entering, .is-entered)
|
|
293
|
+
:is([data-enter-media], .hero__bg, .hero__media, .hero__stage, .hero__art, .hero__window, .hero-visual, .ly-collage):not(img, picture, video, :has(> :is(img, picture, video, .frame__img))) { scale: .98; }
|
|
294
|
+
html.m-enter:not([data-motion="off"]) .hero[data-enter]:not([data-enter="off"], .is-entered) { overflow: clip; }
|
|
295
|
+
}
|
|
296
|
+
/* while it runs: each word of the h1 in its own mask (the masks go when the h1 gets its own nodes back) */
|
|
297
|
+
.hero[data-enter] .m-w { display: inline-block; overflow: clip; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
|
|
298
|
+
.hero[data-enter] .m-w__in { display: inline-block; }
|
|
299
|
+
|
|
300
|
+
/* ---------------------------------------------------------------- reduced motion */
|
|
301
|
+
@media (prefers-reduced-motion: reduce) {
|
|
302
|
+
html:not([data-motion="off"]) .card:hover, html:not([data-motion="off"]) .card--open:hover > .panel,
|
|
303
|
+
html:not([data-motion="off"]) :is(a, .card:has(a), .m-zoom):hover :is(.frame__img, .tile__media > img, img, video),
|
|
304
|
+
html:not([data-motion="off"]) .btn:is(:hover, :active), html:not([data-motion="off"]) :is(.btn--arrow, .link):hover::after,
|
|
305
|
+
:is(a, button):hover > .m-arrow :is(.m-arrow__head, .m-arrow__stem) { transform: none !important; }
|
|
306
|
+
.m-arrow__stem { opacity: 1; transform: none; }
|
|
307
|
+
html:not([data-motion="off"]) .nav__menu { transform: none !important; }
|
|
308
|
+
/* the controls keep their state and their colour change, without travel: the tab pill and the switch
|
|
309
|
+
knob jump, the tick fades in at full size, the underline is drawn at once */
|
|
310
|
+
.m-tab-ind { transition: none; }
|
|
311
|
+
.m-switch::before { transition-property: background-color; }
|
|
312
|
+
.m-switch:active::before { transform: none; }
|
|
313
|
+
.m-switch[aria-checked="true"]::before, .m-switch[aria-checked="true"]:active::before { transform: translateX(16px); }
|
|
314
|
+
.m-check::before { transform: rotate(-45deg) scale(1); transition-property: opacity; }
|
|
315
|
+
html:not([data-motion="off"]) :is(.link, .m-link, p a:not([class]), .footer ul a, .footer .link) { transition-property: color, opacity, background-color, border-color; }
|
|
316
|
+
/* a press still shows, as a deeper tone instead of a move */
|
|
317
|
+
html:not([data-motion="off"]) .btn--primary:active { background: color-mix(in oklab, var(--action) 74%, var(--bg)); }
|
|
318
|
+
html:not([data-motion="off"]) .btn--secondary:active { background: color-mix(in oklab, var(--bg) 86%, var(--ink)); }
|
|
319
|
+
[data-m-loop] * { animation-duration: var(--m-cycle) !important; animation-iteration-count: infinite !important;
|
|
320
|
+
animation-delay: calc(-1 * var(--m-still) * var(--m-cycle)) !important; animation-play-state: paused !important; }
|
|
321
|
+
}
|