Skip to content

Commit 063ff65

Browse files
committed
chore: set vw as the default viewport unit
1 parent 66cca61 commit 063ff65

File tree

4 files changed

+4
-12
lines changed

4 files changed

+4
-12
lines changed

src/auto-imports.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
export {}
77
declare global {
88
const EffectScope: typeof import('vue')['EffectScope']
9-
const LoadingBar: typeof import('@varlet/ui')['LoadingBar']
109
const Picker: typeof import('@varlet/ui')['Picker']
11-
const Snackbar: typeof import('@varlet/ui')['Snackbar']
1210
const StyleProvider: typeof import('@varlet/ui')['StyleProvider']
1311
const afterAll: typeof import('vitest')['afterAll']
1412
const afterEach: typeof import('vitest')['afterEach']

src/styles/dark.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ export const darkTheme = Themes.toViewport({
44
...Themes.dark,
55
'--color-primary': '#00C16A',
66
'--color-nprogress': '#D9FBE8',
7+
}, {
8+
viewportUnit: 'vw',
79
})

src/styles/light.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ export const lightTheme = Themes.toViewport({
44
'--color-primary': '#00C16A',
55
'--color-nprogress': '#75EDAE',
66
'--color-body': '#f7f8fa',
7+
}, {
8+
viewportUnit: 'vw',
79
})

vite.config.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,8 @@ export default ({ mode }: ConfigEnv): UserConfig => {
4040
autoprefixer(),
4141
// https://github.com/wswmsword/postcss-mobile-forever
4242
viewport({
43-
// appSelector: '#app',
44-
mobileUnit: 'vmin',
4543
unitPrecision: 6,
4644
viewportWidth: 375,
47-
enableMediaQuery: true,
48-
disableDesktop: true,
49-
// maxDisplayWidth: 600,
50-
rootContainingBlockSelectorList: [
51-
'var-app-bar',
52-
'van-popup',
53-
'var-bottom-navigation',
54-
],
5545
}),
5646
],
5747
},

0 commit comments

Comments
 (0)