fix(theme): move background colors to theme-default style (#1347)

Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
pull/1653/head
Giedo Donkers 2 years ago committed by GitHub
parent 0565c38fc1
commit 4f0194f1dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -18,7 +18,7 @@ defineProps<{
bottom: 0; bottom: 0;
left: 0; left: 0;
z-index: var(--vp-z-index-backdrop); z-index: var(--vp-z-index-backdrop);
background: rgba(0, 0, 0, .6); background: var(--vp-c-bg-backdrop);
transition: opacity 0.5s; transition: opacity 0.5s;
} }

@ -42,22 +42,17 @@ provide('close-screen', closeScreen)
} }
.VPNav.no-sidebar { .VPNav.no-sidebar {
-webkit-backdrop-filter: saturate(50%) blur(8px); background: var(--vp-c-bg-alpha-without-backdrop);
backdrop-filter: saturate(50%) blur(8px);
background: rgba(255, 255, 255, 0.7);
} }
.dark .VPNav.no-sidebar { @supports (
background: rgba(36, 36, 36, 0.7); (backdrop-filter: saturate(50%) blur(8px)) or
} (-webkit-backdrop-filter: saturate(50%) blur(8px))
) {
@supports not (backdrop-filter: saturate(50%) blur(8px)) {
.VPNav.no-sidebar { .VPNav.no-sidebar {
background: rgba(255, 255, 255, 0.95); -webkit-backdrop-filter: saturate(50%) blur(8px);
} backdrop-filter: saturate(50%) blur(8px);
background: var(--vp-c-bg-alpha-with-backdrop);
.dark .VPNav.no-sidebar {
background: rgba(36, 36, 36, 0.95);
} }
} }
} }

@ -70,24 +70,19 @@ const { hasSidebar } = useSidebar()
} }
.VPNavBar.has-sidebar .content { .VPNavBar.has-sidebar .content {
margin-right: -32px; margin-right: -100vw;
padding-right: 32px; padding-right: 100vw;
-webkit-backdrop-filter: saturate(50%) blur(8px); background: var(--vp-c-bg-alpha-without-backdrop);
backdrop-filter: saturate(50%) blur(8px);
background: rgba(255, 255, 255, 0.7);
} }
.dark .VPNavBar.has-sidebar .content { @supports (
background: rgba(36, 36, 36, 0.7); (backdrop-filter: saturate(50%) blur(8px)) or
} (-webkit-backdrop-filter: saturate(50%) blur(8px))
) {
@supports not (backdrop-filter: saturate(50%) blur(8px)) {
.VPNavBar.has-sidebar .content { .VPNavBar.has-sidebar .content {
background: rgba(255, 255, 255, 0.95); -webkit-backdrop-filter: saturate(50%) blur(8px);
} backdrop-filter: saturate(50%) blur(8px);
background: var(--vp-c-bg-alpha-with-backdrop);
.dark .VPNavBar.has-sidebar .content {
background: rgba(36, 36, 36, 0.95);
} }
} }
} }

@ -88,6 +88,11 @@
--vp-c-bg-mute: var(--vp-c-white-mute); --vp-c-bg-mute: var(--vp-c-white-mute);
--vp-c-bg-alt: var(--vp-c-white-soft); --vp-c-bg-alt: var(--vp-c-white-soft);
--vp-c-bg-alpha-with-backdrop: rgba(255, 255, 255, 0.7);
--vp-c-bg-alpha-without-backdrop: rgba(255, 255, 255, 0.95);
--vp-c-bg-backdrop: rgba(0, 0, 0, 0.6);
--vp-c-divider: var(--vp-c-divider-light-1); --vp-c-divider: var(--vp-c-divider-light-1);
--vp-c-divider-light: var(--vp-c-divider-light-2); --vp-c-divider-light: var(--vp-c-divider-light-2);
@ -121,6 +126,9 @@
--vp-c-bg-mute: var(--vp-c-gray-dark-3); --vp-c-bg-mute: var(--vp-c-gray-dark-3);
--vp-c-bg-alt: var(--vp-c-black); --vp-c-bg-alt: var(--vp-c-black);
--vp-c-bg-alpha-with-backdrop: rgba(36, 36, 36, 0.7);
--vp-c-bg-alpha-without-backdrop: rgba(36, 36, 36, 0.95);
--vp-c-divider: var(--vp-c-divider-dark-1); --vp-c-divider: var(--vp-c-divider-dark-1);
--vp-c-divider-light: var(--vp-c-divider-dark-2); --vp-c-divider-light: var(--vp-c-divider-dark-2);

Loading…
Cancel
Save