mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 07:33:07 +08:00
Add custom base style of Tailwind
This commit is contained in:
+6
-2
@@ -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 },
|
||||
}),
|
||||
],
|
||||
});
|
||||
@@ -1,4 +1,6 @@
|
||||
---
|
||||
import "../styles/base.css";
|
||||
|
||||
export interface Props {
|
||||
title: string;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user