-
Notifications
You must be signed in to change notification settings - Fork 1
/
tailwind.config.js
52 lines (49 loc) · 1.52 KB
/
tailwind.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
const {
default: flattenColorPalette,
} = require("tailwindcss/lib/util/flattenColorPalette");
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx,mdx}", // Menjaga semua file sumber
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
],
darkMode: "class",
theme: {
extend: {
colors: {
primary: '#1F6FEB', // Deep Blue
secondary: '#22D1EE', // Sky Blue
accent: '#FFD700', // Gold
neutralLight: '#F8F9FA', // Light Grey
neutralDark: '#212529', // Very Dark Grey
},
fontFamily: {
poppins: ["Poppins", "sans-serif"],
sans: ['Inter', 'sans-serif'],
},
boxShadow: {
input: `0px 2px 3px -1px rgba(0,0,0,0.1), 0px 1px 0px 0px rgba(25,28,33,0.02), 0px 0px 0px 1px rgba(25,28,33,0.08)`,
},
spacing: {
'72': '18rem',
'84': '21rem',
'96': '24rem',
},
},
},
plugins: [
addVariablesForColors,
require('@tailwindcss/typography'),
],
};
// Plugin untuk menambahkan setiap warna Tailwind sebagai variabel CSS global
function addVariablesForColors({ addBase, theme }) {
let allColors = flattenColorPalette(theme("colors"));
let newVars = Object.fromEntries(Object.entries(allColors).map(([key, val]) => [`--${key}`, val]));
addBase({
":root": newVars,
});
}