add darktheme and names

This commit is contained in:
Romulus21 committed 2026-09-20 16:50:49 +02:00
1 parent 78582bf51e
commit 772c9dcba4
11 files changed
+436 -66

No files matched your search

+21
View File
@@ -4,6 +4,21 @@
la source explicitement : les vues Leptos vivent dans le dossier `src`. */
@source "../src";
/* Variante `dark:` à trois états, pilotée par l'attribut `data-theme` de <html> :
- data-theme="dark" : sombre forcé ;
- data-theme="light" : clair forcé ;
- sans attribut : suit le réglage du système (prefers-color-scheme). */
@custom-variant dark {
&:where([data-theme="dark"], [data-theme="dark"] *) {
@slot;
}
@media (prefers-color-scheme: dark) {
&:where(:not([data-theme="light"], [data-theme="light"] *)) {
@slot;
}
}
}
@theme {
--color-accent: #d6336c;
--color-accent-hover: #b82a5c;
@@ -14,4 +29,10 @@
:root {
color-scheme: light dark;
}
:root[data-theme="light"] {
color-scheme: light;
}
:root[data-theme="dark"] {
color-scheme: dark;
}
}