Add custom base style of Tailwind

This commit is contained in:
Sat Naing
2022-09-08 21:42:09 +06:30
parent 86ee50e716
commit 147d934e97
3 changed files with 18 additions and 3 deletions
+6 -2
View File
@@ -1,8 +1,12 @@
import { defineConfig } from 'astro/config';
import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
// https://astro.build/config
export default defineConfig({
integrations: [tailwind()]
integrations: [
tailwind({
config: { applyBaseStyles: false },
}),
],
});
+2
View File
@@ -1,4 +1,6 @@
---
import "../styles/base.css";
export interface Props {
title: string;
}
+9
View File
@@ -0,0 +1,9 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer components {
.btn-blue {
@apply bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded;
}
}