mirror of
https://github.com/fmhy/edit.git
synced 2025-10-13 00:01:09 +11:00
background change for halloween
This commit is contained in:
parent
b521938d38
commit
3c9169f97f
2 changed files with 19 additions and 0 deletions
|
@ -71,6 +71,14 @@ const updateThemeColor = (colorName: ColorNames) => {
|
|||
--vp-c-brand-soft: ${colorSet[300]};
|
||||
}
|
||||
`
|
||||
|
||||
// Add/remove Halloween theme indicator
|
||||
const htmlElement = document.documentElement
|
||||
if (colorName === 'halloween') {
|
||||
htmlElement.setAttribute('data-halloween-theme', 'true')
|
||||
} else {
|
||||
htmlElement.removeAttribute('data-halloween-theme')
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize theme color
|
||||
|
|
|
@ -104,6 +104,17 @@
|
|||
--vp-custom-block-halloween-text-deep: var(--halloween-200);
|
||||
}
|
||||
|
||||
/* Halloween theme background override */
|
||||
:root:has([data-halloween-theme]) {
|
||||
--vp-c-bg: rgb(20, 20, 20);
|
||||
--vp-c-bg-alt: rgb(18, 18, 18);
|
||||
}
|
||||
|
||||
.dark:has([data-halloween-theme]) {
|
||||
--vp-c-bg: rgb(18, 18, 18);
|
||||
--vp-c-bg-alt: rgb(15, 15, 15);
|
||||
}
|
||||
|
||||
.vp-doc a {
|
||||
color: var(--vp-c-brand-1);
|
||||
text-decoration: underline;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue