Skip to content

Commit 1b608e4

Browse files
committed
feat(#52): typography 및 color semantic 토큰 생성
1 parent 1b991c3 commit 1b608e4

File tree

3 files changed

+122
-0
lines changed

3 files changed

+122
-0
lines changed

src/styles/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
export { colors } from "./colors.css";
22
export { radius } from "./radius.css";
3+
export { semantic } from "./semantic.css";
4+
export { typography } from "./typography.css";

src/styles/semantic.css.ts

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import { createGlobalTheme } from "@vanilla-extract/css";
2+
3+
import { colors } from "./colors.css";
4+
5+
export const semantic = createGlobalTheme(":root", {
6+
primary: {
7+
normal: colors.redOrange[50],
8+
pressed: colors.redOrange[40],
9+
},
10+
dark: {
11+
normal: colors.neutral[10],
12+
pressed: colors.neutral[30],
13+
},
14+
assistive: {
15+
normal: colors.coolNeutral[99],
16+
pressed: colors.coolNeutral[97],
17+
},
18+
text: {
19+
normal: colors.neutral[10],
20+
neutral: colors.neutral[30],
21+
alternative: colors.neutral[50],
22+
disabled: colors.neutral[70],
23+
white: colors.common[100],
24+
primary: colors.redOrange[50],
25+
},
26+
background: {
27+
white: colors.common[100],
28+
grayLight: colors.coolNeutral[99],
29+
grayDark: colors.coolNeutral[97],
30+
dim: "rgba(23, 23, 23, 0.52)",
31+
},
32+
icon: {
33+
black: colors.neutral[20],
34+
white: colors.common[100],
35+
gray: colors.neutral[80],
36+
disabled: colors.neutral[95],
37+
primary: colors.redOrange[50],
38+
},
39+
status: {
40+
positive: colors.green[50],
41+
cautionary: colors.orange[60],
42+
negative: colors.red[50],
43+
},
44+
surface: {
45+
white: colors.common[100],
46+
gray: colors.coolNeutral[99],
47+
disabled: colors.coolNeutral[97],
48+
black: colors.coolNeutral[10],
49+
},
50+
border: {
51+
pressed: colors.redOrange[50],
52+
grayLight: colors.coolNeutral[95],
53+
gray: colors.coolNeutral[80],
54+
disabled: colors.neutral[99],
55+
},
56+
});

src/styles/typography.css.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import { createGlobalTheme } from "@vanilla-extract/css";
2+
3+
export const typography = createGlobalTheme(":root", {
4+
display1: {
5+
fontSize: "40px",
6+
lineHeight: "52px",
7+
letterSpacing: "-0.0282em",
8+
},
9+
display2: {
10+
fontSize: "36px",
11+
lineHeight: "48px",
12+
letterSpacing: "-0.027em",
13+
},
14+
display3: {
15+
fontSize: "32px",
16+
lineHeight: "42px",
17+
letterSpacing: "-0.025em",
18+
},
19+
title1: {
20+
fontSize: "24px",
21+
lineHeight: "32px",
22+
letterSpacing: "-0.023em",
23+
},
24+
title2: {
25+
fontSize: "20px",
26+
lineHeight: "28px",
27+
letterSpacing: "-0.012em",
28+
},
29+
title3: {
30+
fontSize: "18px",
31+
lineHeight: "26px",
32+
letterSpacing: "-0.002em",
33+
},
34+
body1: {
35+
fontSize: "16px",
36+
lineHeight: "24px",
37+
letterSpacing: "0.0057em",
38+
},
39+
body2: {
40+
fontSize: "15px",
41+
lineHeight: "22px",
42+
letterSpacing: "0.0096em",
43+
},
44+
label1: {
45+
fontSize: "14px",
46+
lineHeight: "20px",
47+
letterSpacing: "0.0145em",
48+
},
49+
label2: {
50+
fontSize: "13px",
51+
lineHeight: "18px",
52+
letterSpacing: "0.0194em",
53+
},
54+
caption1: {
55+
fontSize: "12px",
56+
lineHeight: "16px",
57+
letterSpacing: "0.0252em",
58+
},
59+
caption2: {
60+
fontSize: "11px",
61+
lineHeight: "14px",
62+
letterSpacing: "0.0311em",
63+
},
64+
});

0 commit comments

Comments
 (0)