2023-04-20 08:11:24 +00:00
|
|
|
function withOpacity(variableName) {
|
|
|
|
return ({ opacityValue }) => {
|
2023-04-20 12:43:21 +00:00
|
|
|
if (opacityValue !== undefined) return `rgba(var(${variableName}), ${opacityValue})`;
|
|
|
|
|
2023-04-20 08:11:24 +00:00
|
|
|
return `rgb(var(${variableName}))`;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2023-05-10 20:45:49 +00:00
|
|
|
function convertToRGB(variableName) {
|
|
|
|
return `rgb(var(${variableName}))`;
|
|
|
|
}
|
|
|
|
|
2022-11-19 14:21:26 +00:00
|
|
|
module.exports = {
|
2023-04-20 08:11:24 +00:00
|
|
|
darkMode: "class",
|
2022-11-19 14:21:26 +00:00
|
|
|
content: ["./pages/**/*.tsx", "./components/**/*.tsx", "./layouts/**/*.tsx", "./ui/**/*.tsx"],
|
|
|
|
theme: {
|
|
|
|
extend: {
|
|
|
|
colors: {
|
2023-04-20 08:11:24 +00:00
|
|
|
brand: {
|
|
|
|
accent: withOpacity("--color-accent"),
|
2023-04-20 20:45:21 +00:00
|
|
|
base: withOpacity("--color-bg-base"),
|
2023-04-20 08:11:24 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
borderColor: {
|
|
|
|
brand: {
|
|
|
|
base: withOpacity("--color-border"),
|
2023-04-20 12:43:21 +00:00
|
|
|
"surface-1": withOpacity("--color-bg-surface-1"),
|
|
|
|
"surface-2": withOpacity("--color-bg-surface-2"),
|
2023-04-20 08:11:24 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
backgroundColor: {
|
|
|
|
brand: {
|
|
|
|
base: withOpacity("--color-bg-base"),
|
|
|
|
"surface-1": withOpacity("--color-bg-surface-1"),
|
|
|
|
"surface-2": withOpacity("--color-bg-surface-2"),
|
|
|
|
sidebar: withOpacity("--color-bg-sidebar"),
|
2023-04-24 05:49:53 +00:00
|
|
|
backdrop: "#131313",
|
2023-04-20 08:11:24 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
textColor: {
|
|
|
|
brand: {
|
|
|
|
base: withOpacity("--color-text-base"),
|
|
|
|
secondary: withOpacity("--color-text-secondary"),
|
|
|
|
},
|
2022-11-19 14:21:26 +00:00
|
|
|
},
|
|
|
|
keyframes: {
|
|
|
|
leftToaster: {
|
|
|
|
"0%": { left: "-20rem" },
|
|
|
|
"100%": { left: "0" },
|
|
|
|
},
|
|
|
|
rightToaster: {
|
|
|
|
"0%": { right: "-20rem" },
|
|
|
|
"100%": { right: "0" },
|
|
|
|
},
|
|
|
|
},
|
2023-05-10 20:45:49 +00:00
|
|
|
typography: ({ theme }) => ({
|
|
|
|
brand: {
|
|
|
|
css: {
|
|
|
|
"--tw-prose-body": `${convertToRGB("--color-text-base")}`,
|
|
|
|
"--tw-prose-p": `${convertToRGB("--color-text-base")}`,
|
|
|
|
"--tw-prose-headings": `${convertToRGB("--color-text-base")}`,
|
|
|
|
"--tw-prose-lead": `${convertToRGB("--color-text-base")}`,
|
|
|
|
"--tw-prose-links": `${convertToRGB("--color-accent")}`,
|
|
|
|
"--tw-prose-bold": `${convertToRGB("--color-text-base")}`,
|
|
|
|
"--tw-prose-counters": `${convertToRGB("--color-text-base")}`,
|
|
|
|
"--tw-prose-bullets": `${convertToRGB("--color-text-base")}`,
|
|
|
|
"--tw-prose-hr": `${convertToRGB("--color-text-base")}`,
|
|
|
|
"--tw-prose-quotes": `${convertToRGB("--color-text-base")}`,
|
|
|
|
"--tw-prose-quote-borders": `${convertToRGB("--color-border")}`,
|
|
|
|
"--tw-prose-code": `${convertToRGB("--color-text-base")}`,
|
|
|
|
"--tw-prose-pre-code": `${convertToRGB("--color-text-base")}`,
|
|
|
|
"--tw-prose-pre-bg": `${convertToRGB("--color-bg-base")}`,
|
|
|
|
"--tw-prose-th-borders": `${convertToRGB("--color-border")}`,
|
|
|
|
"--tw-prose-td-borders": `${convertToRGB("--color-border")}`,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}),
|
2022-11-19 14:21:26 +00:00
|
|
|
},
|
|
|
|
fontFamily: {
|
|
|
|
custom: ["Inter", "sans-serif"],
|
|
|
|
},
|
|
|
|
},
|
2023-05-10 20:45:49 +00:00
|
|
|
plugins: [require("@tailwindcss/typography")],
|
2022-11-19 14:21:26 +00:00
|
|
|
};
|