feat(ui): implement CSS variables for theme support
This commit is contained in:
@@ -1,2 +1,6 @@
|
|||||||
@background-image: url('/assets/images/background.png');
|
@media (prefers-color-scheme: dark) {
|
||||||
@color: white;
|
:root {
|
||||||
|
--background-image: url('/assets/images/background.png');
|
||||||
|
--color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
@background-image: url('/assets/images/img.png');
|
:root {
|
||||||
@color: black;
|
--background-image: url('/assets/images/img.png');
|
||||||
|
--color: black;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
@import "light-mode.less";
|
@import "light-mode.less";
|
||||||
|
@import "dark-mode.less";
|
||||||
|
|
||||||
|
@background-image: var(--background-image);
|
||||||
|
@color: var(--color);
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-image: @background-image;
|
background-image: @background-image;
|
||||||
background-size: 100vw 100vh;
|
background-size: 100vw 100vh;
|
||||||
|
|||||||
Reference in New Issue
Block a user