2023-11-27 14:45:32 +01:00

26 lines
740 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 {
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);
}
}
}
}
}