[feat] front: design.md 기반 디자인 토큰 + 브랜드 컬러 적용
- index.css 를 shadcn 스타일 토큰 시스템(Tailwind v4 @theme inline)으로 교체 - 다크모드/차트 토큰 제외 (프로젝트 미사용), light 전용 - 브랜드 블루 숫자 스케일 추가: --brand-500/600/700 (hover=톤다운 700) - --primary=brand-600, --ring/--sidebar-ring=brand-500 로 통일 - 폰트: Pretendard CDN(@import, dynamic-subset, 버전 고정) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
8caaa36af2
commit
158e7ba29a
2 files changed
+243
-101
No files matched your search
+131
-101
@@ -1,113 +1,143 @@
|
||||
/* Pretendard (CDN, 버전 고정 + dynamic-subset: 사용 글리프만 로드) */
|
||||
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.css');
|
||||
@import "tailwindcss";
|
||||
|
||||
/* ============================================================
|
||||
디자인 토큰 (출처: design.md)
|
||||
- 이 프로젝트는 다크모드 없음 → light 값만 사용 (.dark / @custom-variant 미사용)
|
||||
- 차트(--chart-*) 미사용 → 정의하지 않음
|
||||
============================================================ */
|
||||
:root {
|
||||
--text: #6b6375;
|
||||
--text-h: #08060d;
|
||||
--bg: #fff;
|
||||
--border: #e5e4e7;
|
||||
--code-bg: #f4f3ec;
|
||||
--accent: #aa3bff;
|
||||
--accent-bg: rgba(170, 59, 255, 0.1);
|
||||
--accent-border: rgba(170, 59, 255, 0.5);
|
||||
--social-bg: rgba(244, 243, 236, 0.5);
|
||||
--shadow:
|
||||
rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px;
|
||||
color-scheme: light;
|
||||
|
||||
--sans: system-ui, 'Segoe UI', Roboto, sans-serif;
|
||||
--heading: system-ui, 'Segoe UI', Roboto, sans-serif;
|
||||
--mono: ui-monospace, Consolas, monospace;
|
||||
--radius: 0.625rem; /* 10px (기준값) */
|
||||
|
||||
font: 18px/145% var(--sans);
|
||||
letter-spacing: 0.18px;
|
||||
color-scheme: light dark;
|
||||
color: var(--text);
|
||||
background: var(--bg);
|
||||
font-synthesis: none;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
/* --- 브랜드 메인 컬러 (blue, 숫자 스케일) --- */
|
||||
--brand-500: #3b7de0; /* light : 강조/포커스 등 밝은 변형 */
|
||||
--brand-600: #0046b0; /* base : 기본 메인 컬러 (= --primary) */
|
||||
--brand-700: #003380; /* deep : hover/pressed 등 톤다운 상태 */
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
font-size: 16px;
|
||||
/* --- 색상 --- */
|
||||
--background: #ffffff;
|
||||
--background-rgb: 250, 250, 250; /* rgba() 조합용 raw 값 */
|
||||
--foreground: #0a0a0a;
|
||||
|
||||
--card: #ffffff;
|
||||
--card-foreground: #0a0a0a;
|
||||
--popover: #ffffff;
|
||||
--popover-foreground: #0a0a0a;
|
||||
|
||||
--primary: var(--brand-600); /* 메인 컬러 = 브랜드 base(600) */
|
||||
--primary-foreground: #fafafa; /* primary 위 텍스트(흰색) */
|
||||
--secondary: #f5f5f5;
|
||||
--secondary-foreground: #171717;
|
||||
--muted: #f5f5f5;
|
||||
--muted-foreground: #737373;
|
||||
--accent: #f5f5f5;
|
||||
--accent-foreground: #171717;
|
||||
|
||||
--border: #e5e5e5;
|
||||
--input: #e5e5e5;
|
||||
--ring: var(--brand-500); /* 포커스 링 = 브랜드 light(500) */
|
||||
|
||||
--destructive: #e7000b;
|
||||
--success: #10b981;
|
||||
--warning: #f59e0b;
|
||||
|
||||
/* --- 사이드바 --- */
|
||||
--sidebar: #fafafa;
|
||||
--sidebar-foreground: #0a0a0a;
|
||||
--sidebar-primary: #171717;
|
||||
--sidebar-primary-foreground: #fafafa;
|
||||
--sidebar-accent: #f5f5f5;
|
||||
--sidebar-accent-foreground: #171717;
|
||||
--sidebar-border: #e5e5e5;
|
||||
--sidebar-ring: var(--brand-500); /* 포커스 링 = 브랜드 light(500), --ring 과 통일 */
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
Tailwind 테마 매핑 (@theme inline)
|
||||
토큰을 유틸로 노출: bg-*, text-*, border-*, rounded-*, font-* 등
|
||||
============================================================ */
|
||||
@theme inline {
|
||||
/* 브랜드 메인 컬러 (bg-brand-600 / text-brand-700 / hover:bg-brand-700 ...) */
|
||||
--color-brand-500: var(--brand-500);
|
||||
--color-brand-600: var(--brand-600);
|
||||
--color-brand-700: var(--brand-700);
|
||||
|
||||
/* 색상 */
|
||||
--color-background: var(--background);
|
||||
--color-foreground: var(--foreground);
|
||||
--color-card: var(--card);
|
||||
--color-card-foreground: var(--card-foreground);
|
||||
--color-popover: var(--popover);
|
||||
--color-popover-foreground: var(--popover-foreground);
|
||||
--color-primary: var(--primary);
|
||||
--color-primary-foreground: var(--primary-foreground);
|
||||
--color-secondary: var(--secondary);
|
||||
--color-secondary-foreground: var(--secondary-foreground);
|
||||
--color-muted: var(--muted);
|
||||
--color-muted-foreground: var(--muted-foreground);
|
||||
--color-accent: var(--accent);
|
||||
--color-accent-foreground: var(--accent-foreground);
|
||||
--color-border: var(--border);
|
||||
--color-input: var(--input);
|
||||
--color-ring: var(--ring);
|
||||
--color-destructive: var(--destructive);
|
||||
--color-success: var(--success);
|
||||
--color-warning: var(--warning);
|
||||
|
||||
/* 사이드바 */
|
||||
--color-sidebar: var(--sidebar);
|
||||
--color-sidebar-foreground: var(--sidebar-foreground);
|
||||
--color-sidebar-primary: var(--sidebar-primary);
|
||||
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
||||
--color-sidebar-accent: var(--sidebar-accent);
|
||||
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
||||
--color-sidebar-border: var(--sidebar-border);
|
||||
--color-sidebar-ring: var(--sidebar-ring);
|
||||
|
||||
/* 폰트 */
|
||||
--font-sans: 'Pretendard Variable', 'Geist Variable', system-ui, sans-serif;
|
||||
--font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
|
||||
--font-heading: var(--font-sans);
|
||||
|
||||
/* 모서리 반경 (--radius 의 배수) */
|
||||
--radius-sm: calc(var(--radius) * 0.6); /* 6px */
|
||||
--radius-md: calc(var(--radius) * 0.8); /* 8px */
|
||||
--radius-lg: var(--radius); /* 10px */
|
||||
--radius-xl: calc(var(--radius) * 1.4); /* 14px */
|
||||
--radius-2xl: calc(var(--radius) * 1.8); /* 18px */
|
||||
--radius-3xl: calc(var(--radius) * 2.2); /* 22px */
|
||||
--radius-4xl: calc(var(--radius) * 2.6); /* 26px */
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
기본 스타일
|
||||
============================================================ */
|
||||
@layer base {
|
||||
body {
|
||||
margin: 0;
|
||||
min-height: 100svh;
|
||||
background-color: var(--background);
|
||||
color: var(--foreground);
|
||||
font-family: var(--font-sans);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-rendering: optimizeLegibility;
|
||||
font-synthesis: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--text: #9ca3af;
|
||||
--text-h: #f3f4f6;
|
||||
--bg: #16171d;
|
||||
--border: #2e303a;
|
||||
--code-bg: #1f2028;
|
||||
--accent: #c084fc;
|
||||
--accent-bg: rgba(192, 132, 252, 0.15);
|
||||
--accent-border: rgba(192, 132, 252, 0.5);
|
||||
--social-bg: rgba(47, 48, 58, 0.5);
|
||||
--shadow:
|
||||
rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px;
|
||||
}
|
||||
|
||||
#social .button-icon {
|
||||
filter: invert(1) brightness(2);
|
||||
}
|
||||
/* 스크롤바 (webkit) — 6px, thumb=border / hover=muted-foreground */
|
||||
::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
|
||||
#root {
|
||||
width: 1126px;
|
||||
max-width: 100%;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
border-inline: 1px solid var(--border);
|
||||
min-height: 100svh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: var(--border);
|
||||
border-radius: 9999px;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2 {
|
||||
font-family: var(--heading);
|
||||
font-weight: 500;
|
||||
color: var(--text-h);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 56px;
|
||||
letter-spacing: -1.68px;
|
||||
margin: 32px 0;
|
||||
@media (max-width: 1024px) {
|
||||
font-size: 36px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
}
|
||||
h2 {
|
||||
font-size: 24px;
|
||||
line-height: 118%;
|
||||
letter-spacing: -0.24px;
|
||||
margin: 0 0 8px;
|
||||
@media (max-width: 1024px) {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
code,
|
||||
.counter {
|
||||
font-family: var(--mono);
|
||||
display: inline-flex;
|
||||
border-radius: 4px;
|
||||
color: var(--text-h);
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: 15px;
|
||||
line-height: 135%;
|
||||
padding: 4px 8px;
|
||||
background: var(--code-bg);
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background-color: var(--muted-foreground);
|
||||
}
|
||||
Reference in new issue
Block a user