website/static/src/scss/_mixins.scss

12 lines
254 B
SCSS
Raw Normal View History

@mixin dark-mode {
2022-08-20 15:55:50 +01:00
// Ensure animations aren't for the initial transition
2022-08-20 17:45:12 +01:00
html.dark-mode-animate & {
2022-08-20 15:55:50 +01:00
transition-duration: 0.5s;
2022-08-20 17:45:12 +01:00
transition-property: color, background-color, border-color, filter;
2022-08-20 15:55:50 +01:00
}
2022-08-20 17:45:12 +01:00
html.dark-mode & {
@content;
}
}