|
| 1 | +/** @type {import('tailwindcss').Config} */ |
| 2 | +module.exports = { |
| 3 | + content: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'], |
| 4 | + theme: { |
| 5 | + extend: { |
| 6 | + /* colors */ |
| 7 | + colors: { |
| 8 | + mint: { |
| 9 | + 50: 'var(--color-main-1)', |
| 10 | + 100: 'var(--color-main-2)', |
| 11 | + 200: 'var(--color-main-3)', |
| 12 | + 300: 'var(--color-main-4)', |
| 13 | + 400: 'var(--color-main-5)', |
| 14 | + 500: 'var(--color-main-6)', |
| 15 | + 600: 'var(--color-main-7)', |
| 16 | + 700: 'var(--color-main-8)', |
| 17 | + 800: 'var(--color-main-9)', |
| 18 | + 900: 'var(--color-main-10)', |
| 19 | + }, |
| 20 | + pink: { |
| 21 | + 50: 'var(--color-secondary-1)', |
| 22 | + 100: 'var(--color-secondary-2)', |
| 23 | + 200: 'var(--color-secondary-3)', |
| 24 | + 300: 'var(--color-secondary-4)', |
| 25 | + 400: 'var(--color-secondary-5)', |
| 26 | + 500: 'var(--color-secondary-6)', |
| 27 | + 600: 'var(--color-secondary-7)', |
| 28 | + 700: 'var(--color-secondary-8)', |
| 29 | + 800: 'var(--color-secondary-9)', |
| 30 | + 900: 'var(--color-secondary-10)', |
| 31 | + }, |
| 32 | + gray: { |
| 33 | + 50: 'var(--color-gray-1)', |
| 34 | + 100: 'var(--color-gray-2)', |
| 35 | + 200: 'var(--color-gray-3)', |
| 36 | + 300: 'var(--color-gray-4)', |
| 37 | + 400: 'var(--color-gray-5)', |
| 38 | + 500: 'var(--color-gray-6)', |
| 39 | + 600: 'var(--color-gray-7)', |
| 40 | + 700: 'var(--color-gray-8)', |
| 41 | + 800: 'var(--color-gray-9)', |
| 42 | + 900: 'var(--color-gray-10)', |
| 43 | + }, |
| 44 | + blue: { |
| 45 | + 400: 'var(--color-blue)' |
| 46 | + }, |
| 47 | + red: { |
| 48 | + 300: 'var(--color-red-1)', |
| 49 | + 400: 'var(--color-red-2)', |
| 50 | + }, |
| 51 | + background: 'var(--background)', |
| 52 | + foreground: 'var(--foreground)', |
| 53 | + }, |
| 54 | + /* display */ |
| 55 | + display: { |
| 56 | + 'layout-flex': 'flex', |
| 57 | + 'layout-grid': 'grid', |
| 58 | + 'layout-block': 'block', |
| 59 | + 'layout-inline': 'inline-block', |
| 60 | + }, |
| 61 | + /* grid & layout */ |
| 62 | + gridTemplateColumns: { |
| 63 | + 'layout-6': 'repeat(6, minmax(0, 1fr))', // 모바일 6컬럼 그리드 |
| 64 | + 'layout-4': 'repeat(4, minmax(0, 1fr))', // 모바일 4컬럼 그리드 |
| 65 | + }, |
| 66 | + gridTemplateRows: { |
| 67 | + 'layout-auto': 'auto', |
| 68 | + }, |
| 69 | + maxWidth: { |
| 70 | + mobile: '430px', // 모바일 최대 넓이 |
| 71 | + }, |
| 72 | + minWidth: { |
| 73 | + 100: '100px', |
| 74 | + 200: '200px', |
| 75 | + }, |
| 76 | + /* padding, margin, gap 모두 사용 가능*/ |
| 77 | + spacing: { |
| 78 | + 0: '0rem', |
| 79 | + 1: '0.4rem', |
| 80 | + 2: '0.8rem', |
| 81 | + 3: '1rem', |
| 82 | + 4: '1.6rem', |
| 83 | + 5: '2rem', |
| 84 | + 6: '2.4rem', |
| 85 | + 7: '2.8rem', |
| 86 | + 8: '3.2rem', |
| 87 | + 9: '3.6rem', |
| 88 | + 10: '4rem', |
| 89 | + 18: '7.2rem', |
| 90 | + }, |
| 91 | + /* Radius*/ |
| 92 | + borderRadius: { |
| 93 | + xs: '2px', |
| 94 | + base: '5px', |
| 95 | + sm: '4px', |
| 96 | + md: '8px', |
| 97 | + lg: '16px', |
| 98 | + xl: '24px', |
| 99 | + full: '9999px', |
| 100 | + }, |
| 101 | + /* font*/ |
| 102 | + fontFamily: { |
| 103 | + sans: ['Pretendard', 'system-ui', 'sans-serif'], |
| 104 | + serif: ['JEN Serif', 'serif'], |
| 105 | + }, |
| 106 | + }, |
| 107 | + }, |
| 108 | + plugins: [ |
| 109 | + function ({ addUtilities }) { |
| 110 | + const newUtilities = { |
| 111 | + /* Pretendard */ |
| 112 | + /* DISPLAY */ |
| 113 | + '.text-display-lg': { |
| 114 | + fontSize: '5.7rem', //57px |
| 115 | + fontWeight: 300, |
| 116 | + lineHeight: '6.4rem', //64px |
| 117 | + letterSpacing: '-0.025rem', //-0.25px', |
| 118 | + fontFamily: 'Pretendard, system-ui, sans-serif', |
| 119 | + }, |
| 120 | + '.text-display-md': { |
| 121 | + fontSize: '5.2rem', //52px |
| 122 | + fontWeight: 300, |
| 123 | + lineHeight: '4.5rem', //45px |
| 124 | + fontFamily: 'Pretendard, system-ui, sans-serif', |
| 125 | + }, |
| 126 | + '.text-display-sm': { |
| 127 | + fontSize: '3.6rem', //36px |
| 128 | + fontWeight: 300, |
| 129 | + lineHeight: '4.4rem', //44px |
| 130 | + fontFamily: 'Pretendard, system-ui, sans-serif', |
| 131 | + }, |
| 132 | + /* HEADLINE */ |
| 133 | + '.text-headline-lg': { |
| 134 | + fontSize: '3.2rem', //32px |
| 135 | + fontWeight: 200, |
| 136 | + lineHeight: '4rem', //40px |
| 137 | + fontFamily: 'Pretendard, system-ui, sans-serif', |
| 138 | + }, |
| 139 | + '.text-headline-md': { |
| 140 | + fontSize: '2.8rem', //28px |
| 141 | + fontWeight: 200, |
| 142 | + lineHeight: '3.2rem', //32px |
| 143 | + fontFamily: 'Pretendard, system-ui, sans-serif', |
| 144 | + }, |
| 145 | + '.text-headline-sm': { |
| 146 | + fontSize: '2.4rem', //24px |
| 147 | + fontWeight: 200, |
| 148 | + lineHeight: '3.2rem', //32px |
| 149 | + fontFamily: 'Pretendard, system-ui, sans-serif', |
| 150 | + }, |
| 151 | + |
| 152 | + /* TITLE */ |
| 153 | + '.text-title-lg': { |
| 154 | + fontSize: '2.2rem', //22px |
| 155 | + fontWeight: 400, |
| 156 | + lineHeight: '1.75rem', //28px |
| 157 | + fontFamily: 'Pretendard, system-ui, sans-serif', |
| 158 | + }, |
| 159 | + '.text-title-md': { |
| 160 | + fontSize: '1.6rem', //16px |
| 161 | + fontWeight: 400, |
| 162 | + lineHeight: '2.4rem', //24px |
| 163 | + letterSpacing: '0.015rem', //0.15px |
| 164 | + fontFamily: 'Pretendard, system-ui, sans-serif', |
| 165 | + }, |
| 166 | + '.text-title-sm': { |
| 167 | + fontSize: '1.4rem', //14px |
| 168 | + fontWeight: 400, |
| 169 | + lineHeight: '2rem', //20px |
| 170 | + letterSpacing: '0.01rem', //0.1px |
| 171 | + fontFamily: 'Pretendard, system-ui, sans-serif', |
| 172 | + }, |
| 173 | + /* LABEL */ |
| 174 | + '.text-label-lg': { |
| 175 | + fontSize: '1.4rem', //14px |
| 176 | + fontWeight: 300, |
| 177 | + lineHeight: '2rem', //20px |
| 178 | + letterSpacing: '0.01rem', //0.1px |
| 179 | + fontFamily: 'Pretendard, system-ui, sans-serif', |
| 180 | + }, |
| 181 | + '.text-label-md': { |
| 182 | + fontSize: '1.2em', //12px |
| 183 | + fontWeight: 300, |
| 184 | + lineHeight: '1.6rem', //16px |
| 185 | + letterSpacing: '0.05rem', //0.5px |
| 186 | + fontFamily: 'Pretendard, system-ui, sans-serif', |
| 187 | + }, |
| 188 | + '.text-label-sm': { |
| 189 | + fontSize: '1.1rem', //11px |
| 190 | + fontWeight: 300, |
| 191 | + lineHeight: '1.6rem', //16px |
| 192 | + letterSpacing: '0.05rem', //0.5px |
| 193 | + fontFamily: 'Pretendard, system-ui, sans-serif', |
| 194 | + }, |
| 195 | + /* BODY */ |
| 196 | + '.text-body-lg': { |
| 197 | + fontSize: '1.4rem', //14px, |
| 198 | + fontWeight: 400, |
| 199 | + lineHeight: '2.4rem', //24px |
| 200 | + letterSpacing: '0.05rem', //0.5px |
| 201 | + fontFamily: 'Pretendard, system-ui, sans-serif', |
| 202 | + }, |
| 203 | + '.text-body-md': { |
| 204 | + fontSize: '1.2rem', //12px |
| 205 | + fontWeight: 300, |
| 206 | + lineHeight: '2rem', //20px |
| 207 | + letterSpacing: '0.025rem', //0.25px |
| 208 | + fontFamily: 'Pretendard, system-ui, sans-serif', |
| 209 | + }, |
| 210 | + '.text-body-sm': { |
| 211 | + fontSize: '1rem', //10px |
| 212 | + fontWeight: 200, |
| 213 | + lineHeight: '1.6rem', //16px |
| 214 | + letterSpacing: '0.04rem', // 0.4px |
| 215 | + fontFamily: 'Pretendard, system-ui, sans-serif', |
| 216 | + }, |
| 217 | + |
| 218 | + /* JEN Serif */ |
| 219 | + /* DISPLAY */ |
| 220 | + '.text-display-serif': { |
| 221 | + fontSize: '3.6rem', //36px |
| 222 | + fontWeight: 200, |
| 223 | + lineHeight: '4.6rem', //46px |
| 224 | + letterSpacing: '0.6rem', //6px |
| 225 | + fontFamily: 'JEN Serif, serif', |
| 226 | + }, |
| 227 | + /* HEADLINE */ |
| 228 | + '.text-headline-lg-serif': { |
| 229 | + fontSize: '3.2rem', //32px |
| 230 | + fontWeight: 200, |
| 231 | + lineHeight: '4rem', //40px |
| 232 | + letterSpacing: '0.2rem', //2px |
| 233 | + fontFamily: 'JEN Serif, serif', |
| 234 | + }, |
| 235 | + '.text-headline-md-serif': { |
| 236 | + fontSize: '2.4rem', //24px |
| 237 | + fontWeight: 200, |
| 238 | + lineHeight: '3.2rem', //32px |
| 239 | + letterSpacing: '0.2rem', //2px |
| 240 | + fontFamily: 'JEN Serif, serif', |
| 241 | + }, |
| 242 | + '.text-headline-sm-serif': { |
| 243 | + fontSize: '2rem', //20px |
| 244 | + fontWeight: 200, |
| 245 | + lineHeight: '2.4rem', //24px |
| 246 | + letterSpacing: '1.2rem', //12px |
| 247 | + fontFamily: 'JEN Serif, serif', |
| 248 | + }, |
| 249 | + /* LABEL */ |
| 250 | + '.text-label-serif': { |
| 251 | + fontSize: '1.4rem', //14px |
| 252 | + fontWeight: 200, |
| 253 | + lineHeight: '2rem', //20px |
| 254 | + letterSpacing: '0.4rem', //4px |
| 255 | + fontFamily: 'JEN Serif, serif', |
| 256 | + }, |
| 257 | + }; |
| 258 | + addUtilities(newUtilities); |
| 259 | + }, |
| 260 | + ], |
| 261 | +}; |
0 commit comments