Skip to content

Commit 2c6d05f

Browse files
committed
feat: use unocss wind4 preset
1 parent 1a3ee1f commit 2c6d05f

File tree

12 files changed

+323
-362
lines changed

12 files changed

+323
-362
lines changed

Diff for: app/app.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ body,
2323
}
2424
2525
html.dark {
26-
background: #222;
27-
color: white;
26+
color-scheme: dark;
2827
}
2928
</style>

Diff for: app/components/Counter.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ const { count, inc, dec } = useCount()
44

55
<template>
66
<div inline-flex m="y-3">
7-
<button rounded-full p-2 btn @click="dec()">
7+
<button p-2 rounded-full btn @click="dec()">
88
<div i-carbon-subtract />
99
</button>
1010
<div font="mono" w="15" m-auto inline-block>
1111
{{ count }}
1212
</div>
13-
<button rounded-full p-2 btn @click="inc()">
13+
<button p-2 rounded-full btn @click="inc()">
1414
<div i-carbon-add />
1515
</button>
1616
</div>

Diff for: app/components/InputEntry.vue

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ function go() {
1414
id="input"
1515
v-model="name"
1616
placeholder="What's your name?"
17-
type="text" autocomplete="off"
17+
type="text"
18+
autocomplete="off"
1819
p="x-4 y-2" m="t-5" w="250px"
1920
text="center" bg="transparent"
2021
border="~ rounded gray-200 dark:gray-700"
@@ -23,7 +24,7 @@ function go() {
2324
>
2425
<div>
2526
<button
26-
m-3 text-sm btn
27+
text-sm m-3 btn
2728
:disabled="!name"
2829
@click="go"
2930
>

Diff for: app/components/Logos.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<template>
2-
<div inline-flex cursor-default text-2xl font-300>
2+
<div text-2xl font-300 inline-flex cursor-default>
33
<div flex flex-col children:mx-auto>
4-
<img inline-block h-18 w-18 src="/nuxt.svg">
5-
<span mt--2 text-green5>Nuxt 3</span>
4+
<img h-18 w-18 inline-block src="/nuxt.svg">
5+
<span text-green5 mt--2>Nuxt 3</span>
66
</div>
77
<div
88
text="3xl gray4"
99
m="x-4 y-auto"
1010
i-carbon-add transform transition-all-500 hover:rotate-135
1111
/>
1212
<div flex flex-col children:mx-auto>
13-
<img inline-block h-18 w-18 src="/vite.png">
14-
<span mt--2 text-purple5>Vitesse</span>
13+
<img h-18 w-18 inline-block src="/vite.png">
14+
<span text-purple-500 mt--2>Vitesse</span>
1515
</div>
1616
</div>
1717
</template>

Diff for: app/layouts/default.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<main class="px-10 py-20 text-center">
33
<slot />
44
<Footer />
5-
<div class="mx-auto mt-5 text-center text-sm opacity-25">
5+
<div class="text-sm mx-auto mt-5 text-center opacity-25">
66
[Default Layout]
77
</div>
88
</main>

Diff for: app/layouts/home.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<main class="px-10 py-20 text-center">
33
<slot />
44
<Footer />
5-
<div class="mx-auto mt-5 text-center text-sm opacity-25">
5+
<div class="text-sm mx-auto mt-5 text-center opacity-25">
66
[Home Layout]
77
</div>
88
</main>

Diff for: app/pages/hi/[id].vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ definePageMeta({
1414

1515
<template>
1616
<div>
17-
<div i-twemoji:waving-hand inline-block animate-shake-x animate-duration-5000 text-4xl />
17+
<div i-twemoji:waving-hand text-4xl inline-block animate-shake-x animate-duration-5000 />
1818
<h3 text-2xl font-500>
1919
Hi,
2020
</h3>
@@ -23,7 +23,7 @@ definePageMeta({
2323
</div>
2424

2525
<template v-if="user.otherNames.length">
26-
<div my-4 text-sm>
26+
<div text-sm my-4>
2727
<span op-50>Also as known as:</span>
2828
<ul>
2929
<li v-for="otherName in user.otherNames" :key="otherName">
@@ -39,7 +39,7 @@ definePageMeta({
3939

4040
<div>
4141
<NuxtLink
42-
class="m-3 text-sm btn"
42+
class="text-sm m-3 btn"
4343
to="/"
4444
>
4545
Back

Diff for: app/pages/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const online = useOnline()
1616
You're offline
1717
</div>
1818
<template #fallback>
19-
<div italic op50>
19+
<div op50 italic>
2020
<span animate-pulse>Loading...</span>
2121
</div>
2222
</template>

Diff for: nuxt.config.ts

-4
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ export default defineNuxtConfig({
3333
},
3434
},
3535

36-
css: [
37-
'@unocss/reset/tailwind.css',
38-
],
39-
4036
colorMode: {
4137
classSuffix: '',
4238
},

Diff for: package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,24 @@
1414
"typecheck": "vue-tsc --noEmit"
1515
},
1616
"devDependencies": {
17-
"@antfu/eslint-config": "^4.4.0",
17+
"@antfu/eslint-config": "^4.5.1",
1818
"@iconify-json/carbon": "^1.2.8",
1919
"@iconify-json/twemoji": "^1.2.2",
2020
"@nuxt/devtools": "^2.1.3",
2121
"@nuxt/eslint": "^1.1.0",
2222
"@nuxtjs/color-mode": "^3.5.2",
2323
"@pinia/nuxt": "^0.10.1",
24-
"@unocss/eslint-config": "^66.0.0",
25-
"@unocss/nuxt": "^66.0.0",
24+
"@unocss/eslint-config": "^66.1.0-beta.3",
25+
"@unocss/nuxt": "^66.1.0-beta.3",
2626
"@vite-pwa/nuxt": "^0.10.6",
27-
"@vueuse/nuxt": "^12.7.0",
27+
"@vueuse/nuxt": "^12.8.0",
2828
"consola": "^3.4.0",
2929
"eslint": "^9.21.0",
3030
"eslint-plugin-format": "^1.0.1",
3131
"nuxt": "^3.15.4",
3232
"pinia": "^3.0.1",
3333
"typescript": "^5.8.2",
34+
"unocss": "66.1.0-beta.3",
3435
"vue-tsc": "^2.2.8"
3536
},
3637
"pnpm": {

0 commit comments

Comments
 (0)