Skip to content

The native runtime for three.js: three.js, down to the metal. 45× smaller than Electron, on a Sony PS3, and path-traced at 60 fps on ray-tracing GPUs.

fix(site): scope .out arrow styles to svg so Hello World comparison renders (#296)

Evan (Yifeng) Wangcd5b0c5ada12
diff --git a/site/css/threert.css b/site/css/threert.css
index 3947d87..dd24d4b 100644
--- a/site/css/threert.css
+++ b/site/css/threert.css
@@ -77,10 +77,10 @@ p { margin: 0; }
.nav .links a { text-decoration: none; display: inline-flex; align-items: center; gap: 5px; padding: 6px 0; border-bottom: 1.5px solid transparent; transition: color 0.2s; }
.nav .links a:hover { color: var(--bone); }
.nav .links a[aria-current="page"] { color: var(--bone); border-bottom-color: var(--bone-2); }
-/* A link that leaves for threert.app: an arrow after its words. */
-.out { display: block; flex: none; width: 9px; height: 9px; opacity: 0.6; transition: transform 0.2s var(--ease), opacity 0.2s; }
-a:hover > .out { transform: translate(1px, -1px); opacity: 1; }
-.btn .out { width: 10px; height: 10px; margin-left: -2px; opacity: 0.8; }
+/* A link that leaves for threert.app: an arrow after its words (scoped to svg so it does not collide with .reel .out). */
+svg.out { display: block; flex: none; width: 9px; height: 9px; opacity: 0.6; transition: transform 0.2s var(--ease), opacity 0.2s; }
+a:hover > svg.out { transform: translate(1px, -1px); opacity: 1; }
+.btn svg.out { width: 10px; height: 10px; margin-left: -2px; opacity: 0.8; }
/* GitHub, Discord and X, as their marks. */
.si { display: block; width: 18px; height: 18px; flex: none; }
.nav .links a.ic { padding: 6px 0; }
@@ -114,7 +114,7 @@ a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px soli
.plat { font: 400 12.5px/1.5 var(--font-mono); color: var(--mute); }
/* ---------- Wipe comparison ---------- */
-.cmp { position: relative; overflow: hidden; border-radius: var(--r-2); background: #000; aspect-ratio: 16 / 9; user-select: none; -webkit-user-select: none; touch-action: pan-y; cursor: ew-resize; isolation: isolate; }
+.cmp { position: relative; width: 100%; overflow: hidden; border-radius: var(--r-2); background: #000; aspect-ratio: 16 / 9; user-select: none; -webkit-user-select: none; touch-action: pan-y; cursor: ew-resize; isolation: isolate; }
.cmp .pa, .cmp .pb { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.cmp .pb { clip-path: inset(0 0 0 var(--x, 50%)); }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
@@ -148,7 +148,7 @@ a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px soli
.cap b { color: var(--bone-2); font-weight: 500; }
/* ---------- Synced camera-move player ---------- */
-.seqp { position: relative; border-radius: var(--r-2); overflow: hidden; background: #000; aspect-ratio: 16 / 9; cursor: ew-resize; touch-action: pan-y; }
+.seqp { position: relative; width: 100%; border-radius: var(--r-2); overflow: hidden; background: #000; aspect-ratio: 16 / 9; cursor: ew-resize; touch-action: pan-y; }
.seqp canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.seqp .ctl { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 6; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; background: rgba(8, 9, 11, 0.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font: 500 12px/1 var(--font-mono); color: #ece8e1; cursor: default; }
.seqp .ctl button { appearance: none; border: 0; background: none; color: inherit; cursor: pointer; padding: 0; width: 18px; height: 18px; display: grid; place-items: center; }