div.offscreen { position: fixed; left: -100px; top: -100px; } div.question.reveal label { transition: background-color 0.2s, color 0.2s, border-color 0.2s; } label:has(input[type=radio]) { width: 100%; border-style: solid; border-color: var(--border); border-width: 1px; border-radius: var(--standard-border-radius); text-align: center; position: relative; margin-block: 0.5em; padding-block: 0.4em; font-size: 0.9em; font-weight: bold; box-sizing: border-box; } label:has(input[type=radio]):hover { border-color: var(--accent-hover); color: var(--accent-hover); } label:has(input[type=radio]:disabled):hover { border-color: var(--border); color: var(--text); } label:has(input[type=radio]:checked) { color: var(--accent-text); background-color: var(--accent); } label:has(input[type=radio].answer:checked) { background: green; color: white; } label:has(input[type=radio].answer) { border-color: green; color: green; border-width: 2px; padding-block: calc(0.4em - 1px); } label:has(input[type=radio].wrong:checked) { background: red; color: white; border-color: grey; } label i { position: absolute; left: 6px; display: none; } label:has(input[type=radio].wrong:checked) i, label:has(input[type=radio].answer) i { display: inline-block; } input[type=radio] { visibility: hidden; height: 0; width: 0; padding: 0; margin: 0; margin-inline-start: -1px; } .hidden { display: none !important; } /** * Page transition */ @view-transition { navigation: auto; } @keyframes move-out { from { transform: translateX(0%); } to { transform: translateX(-100%); } } @keyframes move-in { from { transform: translateX(100%); } to { transform: translateX(0%); } } /* Apply the custom animation to the old and new page states */ ::view-transition-old(root) { animation: 0.3s ease-in both move-out; } ::view-transition-new(root) { animation: 0.3s ease-in both move-in; }