跳转到内容

Template:If darkmode/styles.css

轻之舟百科,让知识轻装启航
CaelLab-import​(留言 | 贡献)2026年10月14日 (三) 07:20的版本 (CaelLab-import将页面Template:If darkmode/styles.css的内容模型从“wikitext”更改为“已过滤的CSS”:​导入自中文维基百科)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
/* 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;
	}	

}