Skip to content

Commit

Permalink
Move base style to tailwind config
Browse files Browse the repository at this point in the history
  • Loading branch information
raflymln committed Jul 21, 2023
1 parent e96881d commit c7affca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
11 changes: 0 additions & 11 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
html,
body {
@apply scroll-smooth scroll-pt-12;
}

* {
@apply !box-border;
}
}
12 changes: 11 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* eslint-disable @typescript-eslint/no-var-requires */

const { fontFamily } = require("tailwindcss/defaultTheme");
const plugin = require("tailwindcss/plugin");

module.exports = /** @satisfies {import('tailwindcss').Config} */ ({
mode: "jit",
Expand All @@ -27,5 +28,14 @@ module.exports = /** @satisfies {import('tailwindcss').Config} */ ({
},
extend: {},
},
plugins: [require("@tailwindcss/typography")],
plugins: [
require("@tailwindcss/typography"),
plugin(({ addBase }) => {
addBase({
"html, body": {
"@apply scroll-smooth scroll-pt-12": {},
},
});
}),
],
});

0 comments on commit c7affca

Please sign in to comment.