Skip to content

Commit 4805f38

Browse files
committed
Sets body background using nuxt.config.js
1 parent 7981e79 commit 4805f38

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

app.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ useSeoMeta({
1717
</script>
1818

1919
<template>
20-
<body class="bg-background">
21-
<NuxtLayout>
22-
<NuxtPage />
23-
</NuxtLayout>
24-
</body>
20+
<NuxtLayout>
21+
<NuxtPage />
22+
</NuxtLayout>
2523
</template>

nuxt.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ export default defineNuxtConfig({
33
components: true,
44
modules: ["@nuxt/content", "@nuxtjs/tailwindcss", "nuxt-headlessui"],
55

6+
app: {
7+
head: {
8+
bodyAttrs: {
9+
class: 'bg-background'
10+
}
11+
}
12+
},
13+
614
// Optionally change the default prefix.
715
headlessui: {
816
prefix: "Headless",

0 commit comments

Comments
 (0)