feat: add monochrome theme support (#4537)

* feat: add monochrome theme support

* refactor: implement dedicated monochrome mode
This commit is contained in:
Zenith Rifle 2026-01-04 16:22:51 +08:00 committed by GitHub
parent 703831f6ea
commit bfc15e8141
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 96 additions and 34 deletions

View file

@ -138,17 +138,13 @@
*/
:root {
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(
120deg,
#c4b5fd 30%,
#7bc5e4
);
--vp-home-hero-name-background: -webkit-linear-gradient(120deg,
#c4b5fd 30%,
#7bc5e4);
--vp-home-hero-image-background-image: linear-gradient(
-45deg,
#c4b5fd 50%,
#47caff 50%
);
--vp-home-hero-image-background-image: linear-gradient(-45deg,
#c4b5fd 50%,
#47caff 50%);
--vp-home-hero-image-filter: blur(44px);
}
@ -223,6 +219,7 @@
animation: nprogress-spinner 400ms linear infinite;
}
}
.nprogress-custom-parent {
overflow: hidden;
position: relative;
@ -253,7 +250,7 @@
}
}
#VPContent strong > a {
#VPContent strong>a {
font-weight: bold;
}
@ -358,4 +355,20 @@
mask-size: 100% 100%;
background-color: currentColor;
color: inherit;
}
/* Monochrome Specifics */
html.monochrome {
filter: grayscale(100%);
img,
video,
iframe {
filter: grayscale(100%);
}
::selection {
background-color: #333;
color: #fff;
}
}