2024-04-25 09:55:47 +02:00

28 lines
823 B
SCSS

@use "theme/globals" as *;
@use "sass:math" as math;
$quiz-timer-warn-color: $red !default;
$quiz-timer-iterations: 15 !default;
:host {
.addon-mod_quiz-question-note p {
font-weight: normal;
font-size: var(--mdl-typography-fontSize-md);
margin-top: 2px;
margin-bottom: 2px;
}
core-timer {
// Make the timer go red when it's reaching 0.
@for $i from 0 through $quiz-timer-iterations {
&.core-timer-timeleft-#{$i} {
$timer-background: rgba($quiz-timer-warn-color, 1 - math.div($i, $quiz-timer-iterations));
--timer-background: #{$timer-background};
@if $i <= math.div($quiz-timer-iterations, 2) {
--timer-text-color: var(--white);
}
}
}
}
}