Skip to content

Commit

Permalink
add tailwind base plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
kuroji-fusky committed Jan 13, 2023
1 parent dd36b5a commit 0c1921b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
6 changes: 0 additions & 6 deletions assets/css/main.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
@layer base {
body {
@apply font-open-sans;
}
}

@tailwind base;
@tailwind components;
@tailwind utilities;
File renamed without changes.
File renamed without changes.
18 changes: 17 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @type {import('tailwindcss').Config} */
const defaultTheme = require("tailwindcss/defaultTheme");
const plugin = require("tailwindcss/plugin");

module.exports = {
content: [
Expand All @@ -10,6 +11,22 @@ module.exports = {
"./nuxt.config.{js,ts}",
"./app.vue",
],
plugins: [
plugin(({ addBase, theme }) => {
addBase({
html: {
scrollBehavior: "smooth",
overflowX: "hidden",
"@media (prefers-reduced-motion)": {
scrollBehavior: "auto",
},
},
body: {
fontFamily: theme("fontFamily.open-sans")
}
});
}),
],
theme: {
extend: {
fontFamily: {
Expand All @@ -18,5 +35,4 @@ module.exports = {
},
},
},
plugins: [],
};

0 comments on commit 0c1921b

Please sign in to comment.