mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 19:41:02 +08:00
Update Tailwind config to use only specific breakpoint and color palette
This commit is contained in:
+47
-37
@@ -12,45 +12,55 @@ function withOpacity(variableName) {
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
|
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
|
||||||
theme: {
|
theme: {
|
||||||
extend: {
|
// Remove the following screen breakpoint or add other breakpoints
|
||||||
textColor: {
|
// if one breakpoint is not enough for you
|
||||||
skin: {
|
screens: {
|
||||||
base: withOpacity("--color-text-base"),
|
sm: "640px",
|
||||||
accent: withOpacity("--color-accent"),
|
},
|
||||||
inverted: withOpacity("--color-fill"),
|
|
||||||
},
|
// Uncomment the following extend
|
||||||
},
|
// if existing Tailwind color palette will be used
|
||||||
backgroundColor: {
|
|
||||||
skin: {
|
// extend: {
|
||||||
fill: withOpacity("--color-fill"),
|
textColor: {
|
||||||
accent: withOpacity("--color-accent"),
|
skin: {
|
||||||
inverted: withOpacity("--color-text-base"),
|
base: withOpacity("--color-text-base"),
|
||||||
card: withOpacity("--color-card"),
|
accent: withOpacity("--color-accent"),
|
||||||
"card-muted": withOpacity("--color-card-muted"),
|
inverted: withOpacity("--color-fill"),
|
||||||
},
|
|
||||||
},
|
|
||||||
outlineColor: {
|
|
||||||
skin: {
|
|
||||||
fill: withOpacity("--color-accent"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
borderColor: {
|
|
||||||
skin: {
|
|
||||||
line: withOpacity("--color-border"),
|
|
||||||
fill: withOpacity("--color-text-base"),
|
|
||||||
accent: withOpacity("--color-accent"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
fill: {
|
|
||||||
skin: {
|
|
||||||
base: withOpacity("--color-text-base"),
|
|
||||||
accent: withOpacity("--color-accent"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
fontFamily: {
|
|
||||||
mono: ["IBM Plex Mono", "monospace"],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
backgroundColor: {
|
||||||
|
skin: {
|
||||||
|
fill: withOpacity("--color-fill"),
|
||||||
|
accent: withOpacity("--color-accent"),
|
||||||
|
inverted: withOpacity("--color-text-base"),
|
||||||
|
card: withOpacity("--color-card"),
|
||||||
|
"card-muted": withOpacity("--color-card-muted"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
outlineColor: {
|
||||||
|
skin: {
|
||||||
|
fill: withOpacity("--color-accent"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
borderColor: {
|
||||||
|
skin: {
|
||||||
|
line: withOpacity("--color-border"),
|
||||||
|
fill: withOpacity("--color-text-base"),
|
||||||
|
accent: withOpacity("--color-accent"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
fill: {
|
||||||
|
skin: {
|
||||||
|
base: withOpacity("--color-text-base"),
|
||||||
|
accent: withOpacity("--color-accent"),
|
||||||
|
},
|
||||||
|
transparent: "transparent",
|
||||||
|
},
|
||||||
|
fontFamily: {
|
||||||
|
mono: ["IBM Plex Mono", "monospace"],
|
||||||
|
},
|
||||||
|
// },
|
||||||
},
|
},
|
||||||
plugins: [require("@tailwindcss/typography")],
|
plugins: [require("@tailwindcss/typography")],
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user