模板:If darkmode/styles.css

出自眾神廳
LatO留言 | 貢獻2026年9月17日 (四) 09:27的修訂 (已匯入 1 筆修訂)
(差異) ←上個修訂 | 最新修訂 (差異) | 下個修訂→ (差異)
跳至導覽 跳至搜尋
/* this should be the fallback */
.ifdarkmode > .isdarkmode {
    display: none;
}
.ifdarkmode > .nodarkmode {
    display: inherit; /* fallback */
    display: initial;
}

html.skin-theme-clientpref-night .ifdarkmode > .nodarkmode {
    display: none;
}
html.skin-theme-clientpref-night .ifdarkmode > .isdarkmode {
    display: inherit; /* fallback */
    display: initial;
}

/* dark mode gadget */
html.client-dark-mode .ifdarkmode > .nodarkmode {
	display: none;
}

html.client-dark-mode .ifdarkmode > .isdarkmode {
    display: inherit; /* fallback */
    display: initial;
}

@media screen and (prefers-color-scheme: dark) {
	html.skin-theme-clientpref-os .ifdarkmode > .nodarkmode {
	    display: none;
	}
	html.skin-theme-clientpref-os .ifdarkmode > .isdarkmode {
	    display: inherit; /* fallback */
	    display: initial;
	}
}

@media screen and (prefers-color-scheme: light) {
	html.skin-theme-clientpref-os .ifdarkmode > .isdarkmode {
	    display: none;
	}
	html.skin-theme-clientpref-os .ifdarkmode > .nodarkmode {
	    display: inherit; /* fallback */
	    display: initial;
	}	

}