Skip to content

Commit 4073c1c

Browse files
committed
feat(theme): added CSS var for body bg
1 parent 29030c3 commit 4073c1c

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

docs/.vitepress/theme/style.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
:root {
33

44
/* Background colors */
5-
--vp-background: #f5f4f4;
5+
--vp-background: hsl(var(--a-body-bg-c));
66
--vp-c-bg: var(--vp-background);
77
--vp-c-bg-alt: var(--vp-background);
88
--vp-sidebar-bg-color: var(--vp-background);
@@ -148,7 +148,6 @@
148148
========================== */
149149

150150
:root.dark {
151-
--vp-background: hsl(var(--a-primary-hue), 15%, 5%);
152151
--vp-c-bg-alt: var(--vp-background);
153152
--vp-code-line-highlight-color: hsl(0, 0%, 12%);
154153
}

packages/anu-vue/auto-imports.d.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,10 @@ declare global {
9797
const unrefElement: typeof import('@vueuse/core')['unrefElement']
9898
const until: typeof import('@vueuse/core')['until']
9999
const useActiveElement: typeof import('@vueuse/core')['useActiveElement']
100-
const useArrayDifference: typeof import('@vueuse/core')['useArrayDifference']
101100
const useArrayEvery: typeof import('@vueuse/core')['useArrayEvery']
102101
const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter']
103102
const useArrayFind: typeof import('@vueuse/core')['useArrayFind']
104103
const useArrayFindIndex: typeof import('@vueuse/core')['useArrayFindIndex']
105-
const useArrayFindLast: typeof import('@vueuse/core')['useArrayFindLast']
106-
const useArrayIncludes: typeof import('@vueuse/core')['useArrayIncludes']
107104
const useArrayJoin: typeof import('@vueuse/core')['useArrayJoin']
108105
const useArrayMap: typeof import('@vueuse/core')['useArrayMap']
109106
const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce']
@@ -189,8 +186,6 @@ declare global {
189186
const useOnline: typeof import('@vueuse/core')['useOnline']
190187
const usePageLeave: typeof import('@vueuse/core')['usePageLeave']
191188
const useParallax: typeof import('@vueuse/core')['useParallax']
192-
const useParentElement: typeof import('@vueuse/core')['useParentElement']
193-
const usePerformanceObserver: typeof import('@vueuse/core')['usePerformanceObserver']
194189
const usePermission: typeof import('@vueuse/core')['usePermission']
195190
const usePointer: typeof import('@vueuse/core')['usePointer']
196191
const usePointerLock: typeof import('@vueuse/core')['usePointerLock']
@@ -256,10 +251,8 @@ declare global {
256251
const watchArray: typeof import('@vueuse/core')['watchArray']
257252
const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
258253
const watchDebounced: typeof import('@vueuse/core')['watchDebounced']
259-
const watchDeep: typeof import('@vueuse/core')['watchDeep']
260254
const watchEffect: typeof import('vue')['watchEffect']
261255
const watchIgnorable: typeof import('@vueuse/core')['watchIgnorable']
262-
const watchImmediate: typeof import('@vueuse/core')['watchImmediate']
263256
const watchOnce: typeof import('@vueuse/core')['watchOnce']
264257
const watchPausable: typeof import('@vueuse/core')['watchPausable']
265258
const watchPostEffect: typeof import('vue')['watchPostEffect']

packages/anu-vue/src/plugin.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ const configDefaults: PluginOptions = {
3535
warning: '42.4, 100%, 50%',
3636
danger: '358.3, 100%, 64.9%',
3737
},
38-
cssVars: {},
38+
cssVars: {
39+
'body-bg-c': '0,4.8%,95.9%',
40+
},
3941
},
4042
dark: {
4143
class: 'dark',
@@ -46,7 +48,9 @@ const configDefaults: PluginOptions = {
4648
warning: '42.4, 73%, 50%',
4749
danger: '358.3, 73%, 64.9%',
4850
},
49-
cssVars: {},
51+
cssVars: {
52+
'body-bg-c': 'var(--a-primary-hue), 15%, 5%',
53+
},
5054
},
5155
},
5256
}

packages/preset-theme-default/src/scss/index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ $header-font-family: $body-font-family;
9191
// 👉 Typography
9292

9393
body {
94+
background-color: hsl(var(--a-body-bg-c));
9495
color: $body-color;
9596

9697
// Disable mobile tap blue color

0 commit comments

Comments
 (0)