Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: define design tokens #3

Merged
merged 3 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/portfolio/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ const title = '포트폴리오';
---

<BaseLayout {title}>
<h1 class="m-5 text-lg text-slate-200">{title}</h1>
<h1>{title}</h1>
</BaseLayout>
68 changes: 68 additions & 0 deletions apps/portfolio/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,78 @@
import tailwindColors from 'tailwindcss/colors.js';
import defaultTheme from 'tailwindcss/defaultTheme.js';

import type { Config } from 'tailwindcss';

const COLORS = {
...tailwindColors,
brand: '#b4ec94',
} as const;

const config = {
content: ['./src/**/*.astro'],
corePlugins: {
preflight: false,
},

theme: {
fontFamily: {
default: [
'"Pretendard Variable"',
'Pretendard',
'-apple-system',
'BlinkMacSystemFont',
'system-ui',
'Roboto',
'"Helvetica Neue"',
'"Segoe UI"',
'"Apple SD Gothic Neo"',
'"Noto Sans KR"',
'"Malgun Gothic"',
'"Apple Color Emoji"',
'"Segoe UI Emoji"',
'"Segoe UI Symbol"',
'sans-serif',
],
mono: ['"JetBrains Mono"', ...defaultTheme.fontFamily.mono],
},

backgroundColor: {
primary: {
DEFAULT: COLORS.zinc['900'],
},
},

textColor: {
brand: {
DEFAULT: COLORS.brand,
},
primary: {
DEFAULT: COLORS.zinc['100'],
hover: COLORS.zinc['300'],
pressed: COLORS.zinc['400'],
},
secondary: {
DEFAULT: COLORS.zinc['200'],
},
tertiary: {
DEFAULT: COLORS.zinc['300'],
},
},

borderColor: {
primary: {
DEFAULT: COLORS.zinc['500'],
},
},

fill: {
icon: {
primary: {
DEFAULT: COLORS.zinc['200'],
},
},
},
},
} satisfies Config;

export default config;