146 lines
2.7 KiB
CSS
146 lines
2.7 KiB
CSS
.rating {
|
|
margin-top: 1.5rem;
|
|
padding-top: 1.25rem;
|
|
border-top: 1px solid var(--border);
|
|
}
|
|
|
|
.rating fieldset {
|
|
margin: 0 0 1rem;
|
|
padding: 0;
|
|
border: 0;
|
|
min-width: 0;
|
|
}
|
|
|
|
.rating legend {
|
|
padding: 0;
|
|
margin-bottom: .75rem;
|
|
font-size: 1.05rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.rating .choices {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr 2fr;
|
|
gap: .5rem;
|
|
}
|
|
|
|
.rating .choice {
|
|
position: relative;
|
|
display: block;
|
|
}
|
|
|
|
/* Das echte Radio bleibt für Tastatur und Screenreader erhalten, ist aber unsichtbar */
|
|
.rating .choice input {
|
|
position: absolute;
|
|
inset: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
opacity: 0;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.rating .choice span {
|
|
display: grid;
|
|
place-items: center;
|
|
min-height: 3rem;
|
|
padding: 0 .75rem;
|
|
text-align: center;
|
|
font-weight: 600;
|
|
color: var(--text);
|
|
background: var(--surface);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
transition: border-color .15s, background-color .15s;
|
|
}
|
|
|
|
.rating .choice input:hover + span { border-color: var(--accent); }
|
|
|
|
.rating .choice input:checked + span {
|
|
color: var(--accent-text);
|
|
background: var(--accent);
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.rating .choice input:focus-visible + span {
|
|
outline: 2px solid var(--accent);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.rating button[type="submit"] {
|
|
min-height: 2.75rem;
|
|
padding: 0 1.75rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.rating button[type="submit"]:disabled { opacity: .5; cursor: default; }
|
|
|
|
@media (max-width: 480px) {
|
|
.rating .choices { grid-template-columns: 1fr 1fr; }
|
|
.rating .choice-none { grid-column: 1 / -1; }
|
|
.rating button[type="submit"] { width: 100%; }
|
|
}
|
|
|
|
.result {
|
|
margin-top: 1.5rem;
|
|
padding: 1.25rem 0.5rem 0.5rem; /* oben 1.25rem, sonst 0.5rem */
|
|
border-radius: calc(0.5rem + 6px); /* padding + button radius */
|
|
border: 1px solid transparent;
|
|
}
|
|
|
|
.result.invisible {
|
|
display: none;
|
|
}
|
|
|
|
.result.wrong {
|
|
background-color: #fde8e8;
|
|
border-color: #f5b5b5;
|
|
color: #9b1c1c;
|
|
}
|
|
|
|
.result.right {
|
|
background-color: #e3f6e8;
|
|
border-color: #a6dbb4;
|
|
color: #166534;
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
.result.wrong {
|
|
background-color: #3b1c1c;
|
|
border-color: #7f3434;
|
|
color: #fca5a5;
|
|
}
|
|
|
|
.result.right {
|
|
background-color: #12301d;
|
|
border-color: #2f6b45;
|
|
color: #86efac;
|
|
}
|
|
}
|
|
|
|
.result fieldset {
|
|
margin: 0 0 1rem;
|
|
padding: 0;
|
|
border: 0;
|
|
min-width: 0;
|
|
}
|
|
|
|
.result legend {
|
|
padding: 0;
|
|
margin-bottom: .75rem;
|
|
font-size: 1.05rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.result button[type="submit"] {
|
|
min-height: 2.75rem;
|
|
padding: 0 1.75rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.result button[type="submit"]:disabled { opacity: .5; cursor: default; }
|
|
|
|
@media (max-width: 480px) {
|
|
.result button[type="submit"] { width: 100%; }
|
|
} |