aboutsummaryrefslogtreecommitdiff
path: root/src/style.css
diff options
context:
space:
mode:
authorLalleSX2026-10-24 14:18:00 +0200
committerLalleSX2026-10-24 14:18:00 +0200
commit389fb3a592832092835da0c2cc1608a57ba5f629 (patch)
treead1f89333ec3c84b906fb6546cee7824f58236fa /src/style.css
parentinit (diff)
download3D-Electrophysics-389fb3a592832092835da0c2cc1608a57ba5f629.tar.gz
3D-Electrophysics-389fb3a592832092835da0c2cc1608a57ba5f629.zip
Add tests for math rendering and interactive scenes; update navigation and viewport handling
- Updated `lab.spec.ts` to navigate directly to the field lesson. - Created `math.spec.ts` with tests for math rendering, error checking, and responsive design. - Added `test4.spec.ts` for interactive scenes, ensuring all questions are functional and accessible. - Modified `vite.config.ts` to keep original question/answer links navigable in production.
Diffstat (limited to 'src/style.css')
-rw-r--r--src/style.css75
1 files changed, 74 insertions, 1 deletions
diff --git a/src/style.css b/src/style.css
index a1d6ced..1e8542b 100644
--- a/src/style.css
+++ b/src/style.css
@@ -9,6 +9,7 @@
--border: #2a394a;
}
* { box-sizing: border-box; }
+[hidden] { display: none !important; }
body { margin: 0; }
button, select, input { font: inherit; }
button, select { color: inherit; }
@@ -55,6 +56,9 @@ button:hover { border-color: var(--mint); }
.workbench { min-width: 0; }
#viewport { position: relative; height: clamp(480px, 64dvh, 800px); min-width: 0; overflow: hidden; }
#viewport > canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
+.scene-labels { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; container-type: inline-size; }
+.scene-math-label { pointer-events: none; white-space: nowrap; padding: 2px 5px; border-radius: 3px; background: #101822d9; font-size: 13px; line-height: 1.5; }
+@container (max-width: 599px) { .scene-math-label { font-size: 11px; } }
.scene-toolbar { position: absolute; z-index: 1; top: 20px; left: 24px; right: 24px; display: flex; justify-content: space-between; align-items: center; gap: 10px; pointer-events: none; }
.view-tag { font: 10px monospace; color: #71899d; letter-spacing: 2px; }
.scene-toolbar > div { display: flex; gap: 8px; }
@@ -68,12 +72,81 @@ button:hover { border-color: var(--mint); }
.learning-panel { display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; padding: 28px 32px; border-top: 1px solid var(--border); background: #121d29; }
.learning-panel p { font-size: 13px; color: var(--muted); margin: 12px 0; }
.learning-panel .eyebrow { color: var(--mint); font-size: 10px; margin: 0 0 14px; }
-.equations p { color: #e3ecf3; font: 16px ui-monospace, monospace; line-height: 1.8; margin: 4px 0; }
+.learning-panel > div { min-width: 0; }
+.equations p { color: #e3ecf3; font-size: 16px; margin: 8px 0; }
.learning-panel a { font-size: 11px; }
.challenge { border-left: 1px solid var(--border); padding-left: 30px; }
.challenge > p:not(.eyebrow) { color: #cad8e4; }
details { margin-top: 20px; }
summary { color: var(--muted); font-size: 11px; cursor: pointer; }
+.collections { display: flex; gap: 5px; margin-left: auto; padding: 4px; background: #0c151f; border: 1px solid var(--border); border-radius: 8px; flex-shrink: 0; }
+.collections a { color: var(--muted); text-decoration: none; font-size: 12px; padding: 10px 13px; border-radius: 5px; }
+.collections a[aria-current] { background: #234139; color: #b0f3dc; }
+.test-overview { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding: 30px 34px; background: radial-gradient(ellipse at 80% 0%, #20413988, transparent 65%), #121d29; border-bottom: 1px solid var(--border); }
+.test-overview .eyebrow { font-size: 9px; margin-bottom: 10px; }
+.test-overview h2 { font-size: clamp(22px, 2.4vw, 34px); font-weight: 500; letter-spacing: -1px; margin-bottom: 8px; }
+.test-overview p:last-child { font-size: 12px; color: var(--muted); margin: 0; }
+.test-score { flex-shrink: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
+.test-score strong { font: 17px ui-monospace, monospace; color: var(--mint); }
+.test-score strong span { font-size: 11px; color: var(--muted); }
+.test-score > span { grid-column: 1 / -1; font-size: 10px; color: var(--muted); }
+[role='tab'] small { font: 10px ui-monospace, monospace; color: #729989; padding: 3px 5px; border: 1px solid #294739; border-radius: 4px; }
+.test-question { padding: 14px 16px; margin: 0 0 24px; border-left: 2px solid #708b7e; background: #1b2d35; border-radius: 0 7px 7px 0; }
+.test-question p { font-size: 12px; line-height: 1.75; margin: 9px 0 0; color: #bdcbd5; }
+.test-question .question-lead { margin-top: 0; color: #eef3ed; }
+.observation { padding: 18px 30px; background: #192e31; border-top: 1px solid #2c4947; border-bottom: 1px solid #2c4947; }
+.observation .eyebrow { font-size: 9px; }
+.observation p { margin: 8px 0 0; font-size: 13px; line-height: 1.75; color: #d1e3df; }
+.test-study { padding: 30px 32px; background: #101b26; border-top: 1px solid var(--border); }
+.solution-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
+.solution-heading .eyebrow { margin-bottom: 8px; }
+.solution-heading h3 { font-weight: 500; font-size: 23px; margin: 0; letter-spacing: -0.5px; }
+.solution-heading a { font-size: 11px; }
+.solution details { border: 1px solid #314555; border-radius: 8px; background: #152331; margin: 12px 0; overflow: hidden; }
+.solution summary { font-size: 13px; color: #d0e1e8; padding: 17px 20px; line-height: 1.6; }
+.solution details[open] summary { color: var(--mint); border-bottom: 1px solid #314555; }
+.derivation { margin: 0; padding: 8px 24px 20px 52px; counter-reset: step; }
+.derivation li { padding: 8px 0 0 6px; color: var(--mint); }
+.derivation li::marker { font: 13px ui-monospace, monospace; }
+.derivation p { font-size: 13px !important; color: #a9becb; line-height: 1.8; margin: 8px 0; }
+.derivation .math-step { font-size: 15px !important; color: #edf4ef; background: #0d1924; border-radius: 5px; padding: 12px 14px; }
+.prediction { padding: 24px; margin-top: 24px; border: 1px solid #5b5138; border-radius: 8px; background: #262a28; }
+.prediction .eyebrow { color: var(--gold, #f5d58b); }
+.prediction h3 { font-size: 16px; font-weight: 500; line-height: 1.65; margin: 0 0 16px; }
+.prediction button { background: transparent; border: 1px solid #8c805b; border-radius: 5px; color: #f5d58b; padding: 9px 13px; font-size: 12px; }
+.prediction > p:last-child { font-size: 13px; color: #d3d6c6; line-height: 1.8; margin: 18px 0 0; }
+.lesson-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 30px; }
+.lesson-pagination a { font-size: 12px; text-decoration: none; }
+.lesson-pagination a:first-child { grid-column: 1; }
+.lesson-pagination span { grid-column: 2; font: 11px ui-monospace, monospace; color: var(--muted); }
+.lesson-pagination a:last-child { grid-column: 3; text-align: right; }
+.math-display { max-width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; padding: 6px 2px; scrollbar-width: thin; scrollbar-color: #526e7c transparent; }
+.math-display .katex-display { text-align: left; margin: 0.5em 0; }
+.math-display .katex-display > .katex { text-align: left; }
+.katex { font-size: 1.08em; }
+.math-display:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
+@media (max-width: 850px) {
+ .app-header { flex-wrap: wrap; gap: 16px; }
+ .collections { margin-left: auto; }
+ .header-title { flex: 1; }
+ .test-overview { padding: 25px 22px; gap: 20px; }
+ .test-score { gap: 8px 14px; }
+}
+@media (max-width: 600px) {
+ .app-header { padding: 16px 20px; }
+ .collections { width: 100%; margin: 0; }
+ .collections a { flex: 1; text-align: center; }
+ .test-overview { align-items: flex-start; flex-direction: column; gap: 18px; padding: 24px 20px; }
+ .test-score { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
+ .test-score > span { font-size: 9px; }
+ .observation { padding: 18px 20px; }
+ .test-study { padding: 26px 20px; }
+ .solution-heading { align-items: flex-start; flex-direction: column; }
+ .derivation { padding-left: 35px; padding-right: 14px; }
+ .derivation .math-step { font-size: 13px !important; padding: 10px; }
+ .prediction { padding: 19px; }
+ .lesson-pagination a { font-size: 11px; }
+}
details p { font-size: 11px !important; }
.webgl-error { position: absolute; z-index: 2; top: 140px; left: 12%; right: 12%; padding: 24px; background: #1e2937; border: 1px solid #ff967b; border-radius: 8px; color: #ffb79f; font-size: 14px; line-height: 1.7; }
@media (min-width: 1600px) { main { grid-template-columns: 340px minmax(0, 1fr); } .controls-panel { padding: 32px; } }