fix: the exam's top bar stays put while the question scrolls
Only the question scrolls in the middle column now. The bar carrying the item counter and the tools was inside the scrolling area, so it went up with a long stem — exactly when you wanted it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TqXevQJhxFrM7jJg82cgZN
This commit is contained in:
parent
bb72aa5f60
commit
6556d25a11
3 changed files with 15 additions and 2 deletions
|
|
@ -1705,7 +1705,7 @@ const timerStarted = timeLeft !== null
|
|||
onClick={() => setRailOpen(true)}>›</button>
|
||||
)}
|
||||
{/* Main content */}
|
||||
<div style={{ flex: 1, minWidth: 0 }}>
|
||||
<div className="quiz-main">
|
||||
<div className="quiz-topbar">
|
||||
{examChrome ? (
|
||||
<>
|
||||
|
|
|
|||
|
|
@ -343,6 +343,19 @@ body:has(.quiz-player.is-boxed) .navbar { margin-bottom: 0; }
|
|||
/* Each column scrolls on its own. `min-height: 0` is what lets a grid child
|
||||
shrink below its content and become scrollable at all. */
|
||||
.quiz-player.is-boxed .quiz-layout > * { min-height: 0; overflow-y: auto; }
|
||||
|
||||
/* The middle column is itself two parts: the bar that says where you are, and
|
||||
the question under it. Only the question scrolls — the bar used to go up
|
||||
with it, so the item counter and the tools left the screen exactly when a
|
||||
long stem made you want them. */
|
||||
.quiz-main { flex: 1; min-width: 0; }
|
||||
.quiz-player.is-boxed .quiz-main {
|
||||
display: flex; flex-direction: column; overflow: hidden;
|
||||
}
|
||||
.quiz-player.is-boxed .quiz-main > .quiz-topbar { flex: none; }
|
||||
.quiz-player.is-boxed .quiz-main > *:not(.quiz-topbar) {
|
||||
flex: 1; min-height: 0; overflow-y: auto;
|
||||
}
|
||||
.quiz-player.is-boxed .quiz-sidebar { position: static; max-height: none; }
|
||||
|
||||
.quiz-footbar {
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ export default function ResultsPage() {
|
|||
onClick={() => setRailOpen(true)}>›</button>
|
||||
)}
|
||||
|
||||
<div style={{ flex: 1, minWidth: 0 }}>
|
||||
<div className="quiz-main">
|
||||
<div className="quiz-topbar">
|
||||
<p className="quiz-question-select is-static">
|
||||
<small>Question</small><strong>{current + 1}</strong> of {answers.length}
|
||||
|
|
|
|||
Loading…
Reference in a new issue