@su-record/vibe 2.8.39 → 2.8.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/vibe.figma/SKILL.md +55 -12
- package/skills/vibe.figma/templates/figma-handoff.md +37 -33
- package/skills/vibe.figma.convert/SKILL.md +65 -34
- package/skills/vibe.figma.convert/rubrics/conversion-rules.md +14 -5
- package/skills/vibe.figma.convert/templates/component.md +14 -16
- package/skills/vibe.figma.extract/SKILL.md +2 -2
- package/skills/vibe.figma.extract/rubrics/image-rules.md +69 -47
- package/skills/vibe.figma.analyze/SKILL.md +0 -10
- package/skills/vibe.figma.analyze/rubrics/analysis-dimensions.md +0 -53
- package/skills/vibe.figma.codegen/SKILL.md +0 -10
- package/skills/vibe.figma.codegen/rubrics/code-quality.md +0 -54
- package/skills/vibe.figma.consolidate/SKILL.md +0 -10
- package/skills/vibe.figma.consolidate/templates/consolidation-report.md +0 -95
- package/skills/vibe.figma.frame/SKILL.md +0 -10
- package/skills/vibe.figma.frame/rubrics/frame-selection.md +0 -55
- package/skills/vibe.figma.pipeline/SKILL.md +0 -11
- package/skills/vibe.figma.pipeline/rubrics/pipeline-stages.md +0 -96
- package/skills/vibe.figma.rules/SKILL.md +0 -10
- package/skills/vibe.figma.rules/rubrics/naming-conventions.md +0 -70
- package/skills/vibe.figma.style/SKILL.md +0 -10
- package/skills/vibe.figma.style/rubrics/style-mapping.md +0 -100
package/package.json
CHANGED
|
@@ -37,11 +37,43 @@ Figma 트리가 코드의 원천이다. 스크린샷은 검증용이다.
|
|
|
37
37
|
```
|
|
38
38
|
/vibe.figma
|
|
39
39
|
→ Phase 0: Setup (스택 감지, 디렉토리 생성, 기존 자산 인덱싱)
|
|
40
|
-
→ Phase 1: Storyboard (스토리보드 →
|
|
41
|
-
→ Phase 2: 재료 확보 (디자인 URL → 트리 + 이미지 + 스크린샷)
|
|
40
|
+
→ Phase 1: Storyboard (스토리보드 → 기능 스펙 문서 작성, 파일 생성 없음)
|
|
41
|
+
→ Phase 2: 재료 확보 (디자인 URL → 트리 + 노드 렌더링 이미지 + 스크린샷)
|
|
42
42
|
→ Phase 3: 구조적 코드 생성 (트리 → HTML+SCSS 매핑 + 시맨틱 보강)
|
|
43
43
|
→ Phase 3.5: 컴파일 게이트 (tsc → build → dev 확인)
|
|
44
44
|
→ Phase 4: 시각 검증 루프 (렌더링 vs 스크린샷 비교 → 수정)
|
|
45
|
+
─── 추가 브레이크포인트가 있으면 Phase 2~4 반복 ───
|
|
46
|
+
→ Phase 5: 공통화 (브레이크포인트별 작업 병합 → 최종 프로젝트 구조)
|
|
47
|
+
|
|
48
|
+
브레이크포인트별 작업 구조:
|
|
49
|
+
각 Figma URL의 ROOT name에서 폴더명 추출 (kebab-case):
|
|
50
|
+
"MO_Main ..." → /tmp/{feature}/mo-main/
|
|
51
|
+
"PC_Main ..." → /tmp/{feature}/pc-main/
|
|
52
|
+
|
|
53
|
+
/tmp/{feature}/
|
|
54
|
+
├── mo-main/ ← 첫 번째 URL (모바일)
|
|
55
|
+
│ ├── tree.json
|
|
56
|
+
│ ├── bg/
|
|
57
|
+
│ ├── content/
|
|
58
|
+
│ └── sections/
|
|
59
|
+
├── pc-main/ ← 두 번째 URL (데스크탑)
|
|
60
|
+
│ ├── tree.json
|
|
61
|
+
│ ├── bg/
|
|
62
|
+
│ ├── content/
|
|
63
|
+
│ └── sections/
|
|
64
|
+
└── final/ ← Phase 5 공통화 결과
|
|
65
|
+
├── components/{feature}/
|
|
66
|
+
└── styles/{feature}/
|
|
67
|
+
|
|
68
|
+
Phase 5 공통화:
|
|
69
|
+
1. 각 브레이크포인트의 컴포넌트 diff
|
|
70
|
+
→ 구조 동일: 1개로 병합
|
|
71
|
+
→ 구조 다름: props로 분기 또는 별도 유지
|
|
72
|
+
2. SCSS diff
|
|
73
|
+
→ 같은 값: 기본 스타일
|
|
74
|
+
→ 다른 값: @media 오버라이드
|
|
75
|
+
3. 토큰 diff → 합집합 정리
|
|
76
|
+
4. /tmp/ 임시 폴더 → 프로젝트 디렉토리에 최종 배치
|
|
45
77
|
```
|
|
46
78
|
|
|
47
79
|
---
|
|
@@ -186,7 +218,7 @@ URL에서 fileKey, nodeId 추출
|
|
|
186
218
|
|
|
187
219
|
2단계: name 패턴으로 프레임 분류
|
|
188
220
|
SPEC — "기능 정의서", "정책" → depth 높여서 텍스트 추출
|
|
189
|
-
CONFIG — "해상도", "브라우저" →
|
|
221
|
+
CONFIG — "해상도", "브라우저" → designWidth, minWidth, breakpoint 확보
|
|
190
222
|
SHARED — "공통", "GNB", "Footer", "Popup" → 공통 컴포넌트 파악
|
|
191
223
|
PAGE — "화면설계", "메인 -" → 섹션 목록 + 인터랙션 스펙
|
|
192
224
|
|
|
@@ -369,15 +401,26 @@ Phase 2 완료 시 /tmp/{feature}/ 에 다음이 준비되어야 함:
|
|
|
369
401
|
- 간격: padding, gap, margin 사용 빈도 높은 값
|
|
370
402
|
```
|
|
371
403
|
|
|
372
|
-
###
|
|
404
|
+
### 반응형 단위 (scaleFactor 사용하지 않음)
|
|
373
405
|
|
|
374
406
|
```
|
|
375
|
-
스토리보드 CONFIG
|
|
376
|
-
|
|
377
|
-
|
|
407
|
+
스토리보드 CONFIG에서 확보:
|
|
408
|
+
designWidth: 디자인 너비 (예: 모바일 720px, PC 2560px)
|
|
409
|
+
minWidth: 최소 지원 너비 (예: 340px)
|
|
410
|
+
breakpoint: PC/모바일 분계 (예: 1025px)
|
|
411
|
+
|
|
412
|
+
UI 요소 → vw 비례:
|
|
413
|
+
vw값 = (Figma px / designWidth) × 100
|
|
414
|
+
예: gap: 24px → 24/720 × 100 = 3.33vw
|
|
415
|
+
예: width: 620px → 620/720 = 86.11% (부모 대비)
|
|
416
|
+
|
|
417
|
+
폰트 → clamp(최소, vw, 최대):
|
|
418
|
+
최소값 = 역할별 가독성 기준 (h1:16px, 본문:12px, 캡션:10px)
|
|
419
|
+
vw값 = (Figma px / designWidth) × 100
|
|
420
|
+
최대값 = Figma 원본 px
|
|
421
|
+
예: 24px 본문 → clamp(12px, 3.33vw, 24px)
|
|
378
422
|
|
|
379
|
-
|
|
380
|
-
적용 안 함: color, opacity, font-weight, z-index, line-height(단위 없을 때)
|
|
423
|
+
변환 안 함: color, opacity, font-weight, z-index, line-height(단위 없을 때)
|
|
381
424
|
```
|
|
382
425
|
|
|
383
426
|
---
|
|
@@ -552,7 +595,7 @@ Phase 1에서 생성한 빈 SCSS 파일에 기본 내용 Write:
|
|
|
552
595
|
- 반복 패턴 (동일 구조 3+) → v-for
|
|
553
596
|
c. CSS 직접 매핑:
|
|
554
597
|
- node.css의 모든 속성을 SCSS에 1:1 매핑
|
|
555
|
-
-
|
|
598
|
+
- vw/clamp 반응형 단위 변환 (vibe.figma.convert 참조)
|
|
556
599
|
- tree.json에 없는 CSS 값은 작성하지 않음
|
|
557
600
|
d. Phase 1의 JSDoc, 인터페이스, 핸들러 보존
|
|
558
601
|
|
|
@@ -589,7 +632,7 @@ Phase 1에서 생성한 빈 SCSS 파일에 기본 내용 Write:
|
|
|
589
632
|
SCSS (vibe.figma.convert 참조):
|
|
590
633
|
layout/ → position, display, flex, width, height, padding, gap
|
|
591
634
|
components/ → font, color, border, shadow, opacity
|
|
592
|
-
모든 수치는
|
|
635
|
+
모든 수치는 tree.json의 정확한 값 → vw/clamp 변환 (vibe.figma.convert 참조).
|
|
593
636
|
추정 금지 — 값이 없으면 tree.json에서 다시 찾는다.
|
|
594
637
|
```
|
|
595
638
|
|
|
@@ -780,7 +823,7 @@ import { getComputedStyles, compareStyles, diffsToIssues } from 'src/infra/lib/b
|
|
|
780
823
|
])
|
|
781
824
|
|
|
782
825
|
2. Figma 재료함의 기대값과 비교:
|
|
783
|
-
// tree.json에서 해당 노드의 CSS 수치 (
|
|
826
|
+
// tree.json에서 해당 노드의 CSS 수치 (vw/clamp 변환 후)
|
|
784
827
|
const expected = { 'font-size': '16px', 'color': '#ffffff', 'width': '465px' }
|
|
785
828
|
const diffs = compareStyles(expected, actual)
|
|
786
829
|
|
|
@@ -9,14 +9,15 @@
|
|
|
9
9
|
|
|
10
10
|
## Design Specs
|
|
11
11
|
|
|
12
|
-
### Viewport /
|
|
12
|
+
### Viewport / Responsive
|
|
13
13
|
|
|
14
|
-
| Breakpoint | Design Width |
|
|
15
|
-
|
|
16
|
-
| Mobile (base) | {{DESIGN_MOBILE_PX}}px | {{
|
|
17
|
-
| Desktop | {{DESIGN_PC_PX}}px |
|
|
14
|
+
| Breakpoint | Design Width | Min Width | CSS 단위 |
|
|
15
|
+
|-----------|-------------|-----------|---------|
|
|
16
|
+
| Mobile (base) | {{DESIGN_MOBILE_PX}}px | {{MIN_WIDTH}}px | vw + clamp |
|
|
17
|
+
| Desktop | {{DESIGN_PC_PX}}px | — | vw + clamp |
|
|
18
18
|
|
|
19
19
|
Breakpoint threshold: `@media (min-width: {{BP_PC}}px)`
|
|
20
|
+
ROOT folder: `{{MO_FOLDER}}/`, `{{PC_FOLDER}}/`
|
|
20
21
|
|
|
21
22
|
### Color Tokens
|
|
22
23
|
|
|
@@ -26,15 +27,15 @@ Breakpoint threshold: `@media (min-width: {{BP_PC}}px)`
|
|
|
26
27
|
|
|
27
28
|
### Typography Tokens
|
|
28
29
|
|
|
29
|
-
| Token | Figma px |
|
|
30
|
-
|
|
31
|
-
| `$text-{{ROLE}}` | {{FIGMA_PX}}px | {{
|
|
30
|
+
| Token | Figma px | vw | clamp 최소 | Role |
|
|
31
|
+
|-------|---------|-----|----------|------|
|
|
32
|
+
| `$text-{{ROLE}}` | {{FIGMA_PX}}px | {{VW}}vw | {{MIN_PX}}px | {{ROLE}} |
|
|
32
33
|
|
|
33
34
|
### Spacing Tokens
|
|
34
35
|
|
|
35
|
-
| Token | Figma px |
|
|
36
|
-
|
|
37
|
-
| `$space-{{NAME}}` | {{FIGMA_PX}}px | {{
|
|
36
|
+
| Token | Figma px | vw | Usage |
|
|
37
|
+
|-------|---------|-----|-------|
|
|
38
|
+
| `$space-{{NAME}}` | {{FIGMA_PX}}px | {{VW}}vw | {{USAGE}} |
|
|
38
39
|
|
|
39
40
|
---
|
|
40
41
|
|
|
@@ -44,38 +45,40 @@ Breakpoint threshold: `@media (min-width: {{BP_PC}}px)`
|
|
|
44
45
|
|---|-------------|---------------|-----------|----------------|
|
|
45
46
|
| 1 | {{SECTION_NAME}} | `components/{{FEATURE_KEY}}/{{ComponentName}}.vue` | {{NODE_COUNT}} | {{HEIGHT}}px |
|
|
46
47
|
|
|
47
|
-
**Generation:** tree.json → HTML+SCSS 구조적 매핑 (
|
|
48
|
+
**Generation:** tree.json → HTML+SCSS 구조적 매핑 (vw/clamp 반응형)
|
|
48
49
|
|
|
49
50
|
---
|
|
50
51
|
|
|
51
52
|
## Asset Manifest
|
|
52
53
|
|
|
53
|
-
|
|
|
54
|
-
|
|
55
|
-
|
|
|
54
|
+
| Image | Local Path | Type | Render Method |
|
|
55
|
+
|-------|-----------|------|--------------|
|
|
56
|
+
| {{NAME}} | `/images/{{FEATURE_KEY}}/{{FILE_NAME}}.png` | {{bg\|content\|vector-text}} | {{frame-render\|node-render\|group-render}} |
|
|
56
57
|
|
|
57
|
-
Total assets: {{ASSET_COUNT}}
|
|
58
|
+
Total assets: {{ASSET_COUNT}} (BG 렌더링 {{BG_COUNT}}장 + 콘텐츠 {{CONTENT_COUNT}}장)
|
|
58
59
|
|
|
59
60
|
---
|
|
60
61
|
|
|
61
62
|
## File Structure
|
|
62
63
|
|
|
63
64
|
```
|
|
64
|
-
|
|
65
|
-
{{
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
65
|
+
/tmp/{{FEATURE_KEY}}/
|
|
66
|
+
{{MO_FOLDER}}/ ← 모바일 작업
|
|
67
|
+
tree.json
|
|
68
|
+
bg/
|
|
69
|
+
content/
|
|
70
|
+
sections/
|
|
71
|
+
{{PC_FOLDER}}/ ← 데스크탑 작업
|
|
72
|
+
...
|
|
73
|
+
final/ ← Phase 5 공통화 결과
|
|
74
|
+
components/{{FEATURE_KEY}}/
|
|
75
|
+
styles/{{FEATURE_KEY}}/
|
|
76
|
+
index.scss
|
|
77
|
+
_tokens.scss
|
|
78
|
+
_mixins.scss
|
|
79
|
+
_base.scss
|
|
80
|
+
layout/
|
|
81
|
+
components/
|
|
79
82
|
```
|
|
80
83
|
|
|
81
84
|
---
|
|
@@ -84,8 +87,9 @@ styles/{{FEATURE_KEY}}/
|
|
|
84
87
|
|
|
85
88
|
- [ ] No `figma.com/api` URLs in any generated file
|
|
86
89
|
- [ ] No `placeholder` or empty `src=""` in components
|
|
87
|
-
- [ ] No `<style>` blocks in components
|
|
88
|
-
- [ ] All
|
|
90
|
+
- [ ] No `<style>` blocks in components
|
|
91
|
+
- [ ] All images are node-rendered (no imageRef direct download)
|
|
92
|
+
- [ ] No image file > 5MB (텍스처 fill 의심)
|
|
89
93
|
- [ ] Build passes without errors
|
|
90
94
|
- [ ] Screenshot comparison: P1 issues = 0
|
|
91
95
|
|
|
@@ -44,7 +44,8 @@ component-index (/tmp/{feature}/component-index.json) 에서 매칭되는 컴포
|
|
|
44
44
|
- tree.json (노드 트리 + CSS 속성 — 코드 생성의 PRIMARY 소스)
|
|
45
45
|
- /tmp/{feature}/images/ (다운로드된 이미지 에셋)
|
|
46
46
|
- 섹션 스크린샷 (검증용 — 생성에 사용하지 않음)
|
|
47
|
-
-
|
|
47
|
+
- designWidth (스토리보드 CONFIG: 모바일 720px, PC 2560px)
|
|
48
|
+
- minWidth (최소 지원: 340px)
|
|
48
49
|
|
|
49
50
|
출력:
|
|
50
51
|
- 컴포넌트 파일 (Vue SFC / React TSX)
|
|
@@ -92,10 +93,10 @@ tree.json의 css 객체를 SCSS로 직접 변환한다. 추정하지 않는다.
|
|
|
92
93
|
node.css.flexDirection → flex-direction
|
|
93
94
|
node.css.justifyContent → justify-content
|
|
94
95
|
node.css.alignItems → align-items
|
|
95
|
-
node.css.gap → gap (
|
|
96
|
-
node.css.padding → padding (
|
|
97
|
-
node.css.width → width (
|
|
98
|
-
node.css.height → height (
|
|
96
|
+
node.css.gap → gap (→ vw 변환)
|
|
97
|
+
node.css.padding → padding (→ vw 변환)
|
|
98
|
+
node.css.width → width (→ vw 또는 % 변환)
|
|
99
|
+
node.css.height → height (→ vw 변환, 또는 auto)
|
|
99
100
|
node.css.overflow → overflow
|
|
100
101
|
node.css.position → position
|
|
101
102
|
|
|
@@ -103,24 +104,52 @@ tree.json의 css 객체를 SCSS로 직접 변환한다. 추정하지 않는다.
|
|
|
103
104
|
node.css.backgroundColor → background-color
|
|
104
105
|
node.css.color → color
|
|
105
106
|
node.css.fontFamily → font-family
|
|
106
|
-
node.css.fontSize → font-size (
|
|
107
|
+
node.css.fontSize → font-size (→ clamp 변환)
|
|
107
108
|
node.css.fontWeight → font-weight
|
|
108
109
|
node.css.lineHeight → line-height
|
|
109
|
-
node.css.letterSpacing → letter-spacing (
|
|
110
|
+
node.css.letterSpacing → letter-spacing (→ vw 변환)
|
|
110
111
|
node.css.textAlign → text-align
|
|
111
|
-
node.css.borderRadius → border-radius (
|
|
112
|
-
node.css.border → border (width
|
|
113
|
-
node.css.boxShadow → box-shadow (px
|
|
112
|
+
node.css.borderRadius → border-radius (→ vw 변환)
|
|
113
|
+
node.css.border → border (width → vw 변환)
|
|
114
|
+
node.css.boxShadow → box-shadow (px → vw 변환)
|
|
114
115
|
node.css.opacity → opacity
|
|
115
116
|
node.css.mixBlendMode → mix-blend-mode
|
|
116
|
-
node.css.filter → filter (px
|
|
117
|
-
node.css.backdropFilter → backdrop-filter (px
|
|
118
|
-
|
|
119
|
-
scaleFactor
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
117
|
+
node.css.filter → filter (px → vw 변환)
|
|
118
|
+
node.css.backdropFilter → backdrop-filter (px → vw 변환)
|
|
119
|
+
|
|
120
|
+
반응형 단위 변환 (scaleFactor 사용하지 않음):
|
|
121
|
+
스토리보드 CONFIG에서 확보:
|
|
122
|
+
designWidth: 디자인 너비 (예: 720px 모바일, 2560px PC)
|
|
123
|
+
minWidth: 최소 지원 너비 (예: 340px)
|
|
124
|
+
breakpoint: PC/모바일 분계 (예: 1025px)
|
|
125
|
+
|
|
126
|
+
UI 요소 (width, height, padding, gap, border-radius, shadow 등):
|
|
127
|
+
→ vw 비례: vw값 = (Figma px / designWidth) × 100
|
|
128
|
+
→ 예: gap: 24px / 720 × 100 = 3.33vw
|
|
129
|
+
→ width: 부모 대비 %도 가능 (620/720 = 86%)
|
|
130
|
+
|
|
131
|
+
폰트 (font-size):
|
|
132
|
+
→ clamp(최소, vw, 최대): 가독성 최소값 보장
|
|
133
|
+
→ vw값 = (Figma px / designWidth) × 100
|
|
134
|
+
→ 최소값 = 역할(role)에 따라 결정 (Claude 시맨틱 판단)
|
|
135
|
+
→ 최대값 = Figma 원본 px
|
|
136
|
+
|
|
137
|
+
| 역할 | 최소 | 판단 기준 |
|
|
138
|
+
|------|------|----------|
|
|
139
|
+
| h1~h2 제목 | 16px | name에 "title", 가장 큰 fontSize |
|
|
140
|
+
| h3~h4 소제목 | 14px | 중간 크기 fontSize |
|
|
141
|
+
| 본문 p | 12px | TEXT 노드, 긴 텍스트 |
|
|
142
|
+
| 캡션/라벨 | 10px | 작은 fontSize, 짧은 텍스트 |
|
|
143
|
+
| 버튼 | 12px | name에 "btn" |
|
|
144
|
+
|
|
145
|
+
예시:
|
|
146
|
+
디자인 24px, 본문 → font-size: clamp(12px, 3.33vw, 24px);
|
|
147
|
+
디자인 48px, 제목 → font-size: clamp(16px, 6.67vw, 48px);
|
|
148
|
+
디자인 16px, 캡션 → font-size: clamp(10px, 2.22vw, 16px);
|
|
149
|
+
|
|
150
|
+
변환하지 않는 속성:
|
|
151
|
+
color, opacity, font-weight, font-family, z-index,
|
|
152
|
+
line-height(단위 없을 때), text-align, mix-blend-mode
|
|
124
153
|
|
|
125
154
|
값이 없으면:
|
|
126
155
|
→ 해당 속성 생략 (추정 금지)
|
|
@@ -173,21 +202,21 @@ components/ → font-size, font-weight, color, line-height, letter-spacing,
|
|
|
173
202
|
background-color, background-image, mix-blend-mode, filter
|
|
174
203
|
```
|
|
175
204
|
|
|
176
|
-
### layout 예시 (트리 기반 —
|
|
205
|
+
### layout 예시 (트리 기반 — vw 반응형)
|
|
177
206
|
|
|
178
207
|
```scss
|
|
179
208
|
// tree.json 데이터:
|
|
180
209
|
// Hero: { width:720, height:1280 }
|
|
181
210
|
// Title: { display:flex, flexDirection:column, alignItems:center, gap:24px, width:620, height:230 }
|
|
182
211
|
// Period: { display:flex, flexDirection:column, gap:10px, padding:"22px 14px", width:600, height:220 }
|
|
183
|
-
//
|
|
212
|
+
// designWidth = 720px → vw = (px / 720) × 100
|
|
184
213
|
|
|
185
214
|
@use '../tokens' as t;
|
|
186
215
|
|
|
187
216
|
.heroSection {
|
|
188
217
|
position: relative;
|
|
189
218
|
width: 100%;
|
|
190
|
-
height:
|
|
219
|
+
height: 177.78vw; // 1280 / 720 × 100
|
|
191
220
|
overflow: hidden; // tree: overflow:hidden
|
|
192
221
|
}
|
|
193
222
|
|
|
@@ -195,30 +224,32 @@ components/ → font-size, font-weight, color, line-height, letter-spacing,
|
|
|
195
224
|
display: flex; // tree: display:flex
|
|
196
225
|
flex-direction: column; // tree: flexDirection:column
|
|
197
226
|
align-items: center; // tree: alignItems:center
|
|
198
|
-
gap:
|
|
199
|
-
width:
|
|
227
|
+
gap: 3.33vw; // tree: 24 / 720 × 100
|
|
228
|
+
width: 86.11%; // tree: 620 / 720 (부모 대비 %)
|
|
200
229
|
}
|
|
201
230
|
|
|
202
231
|
.heroPeriod {
|
|
203
232
|
display: flex; // tree: display:flex
|
|
204
233
|
flex-direction: column; // tree: flexDirection:column
|
|
205
|
-
gap:
|
|
206
|
-
padding:
|
|
207
|
-
width:
|
|
234
|
+
gap: 1.39vw; // tree: 10 / 720 × 100
|
|
235
|
+
padding: 3.06vw 1.94vw; // tree: "22px 14px" / 720 × 100
|
|
236
|
+
width: 83.33%; // tree: 600 / 720
|
|
208
237
|
}
|
|
209
238
|
```
|
|
210
239
|
|
|
211
|
-
### components 예시 (트리 기반)
|
|
240
|
+
### components 예시 (트리 기반 — clamp 폰트)
|
|
212
241
|
|
|
213
242
|
```scss
|
|
214
243
|
// tree.json 데이터:
|
|
215
244
|
// TEXT "참여 대상": { fontSize:24px, fontWeight:600, color:#ffffff, fontFamily:Pretendard }
|
|
216
245
|
// BTN_Share: { borderRadius:500px, backgroundColor:rgba(13,40,61,0.5), border:"1px solid #ffffff" }
|
|
246
|
+
// designWidth = 720px, minWidth = 340px
|
|
217
247
|
|
|
218
248
|
@use '../tokens' as t;
|
|
219
249
|
|
|
220
250
|
.heroTarget {
|
|
221
|
-
|
|
251
|
+
// 본문 역할 → 최소 12px
|
|
252
|
+
font-size: clamp(12px, 3.33vw, 24px); // tree: 24 / 720 × 100 = 3.33vw
|
|
222
253
|
font-weight: 600; // tree: fontWeight:600
|
|
223
254
|
color: #ffffff; // tree: color:#ffffff
|
|
224
255
|
font-family: t.$font-pretendard;
|
|
@@ -226,11 +257,11 @@ components/ → font-size, font-weight, color, line-height, letter-spacing,
|
|
|
226
257
|
}
|
|
227
258
|
|
|
228
259
|
.heroShareBtn {
|
|
229
|
-
border-radius:
|
|
260
|
+
border-radius: 69.44vw; // tree: 500 / 720 × 100 (원형 유지)
|
|
230
261
|
background-color: rgba(13, 40, 61, 0.5); // tree 그대로
|
|
231
|
-
border:
|
|
232
|
-
width:
|
|
233
|
-
height:
|
|
262
|
+
border: 0.14vw solid #ffffff; // tree: 1 / 720 × 100
|
|
263
|
+
width: 10vw; // tree: 72 / 720 × 100
|
|
264
|
+
height: 10vw; // 정사각형 유지
|
|
234
265
|
display: flex; // tree: display:flex
|
|
235
266
|
justify-content: center; // tree: justifyContent:center
|
|
236
267
|
align-items: center; // tree: alignItems:center
|
|
@@ -382,7 +413,7 @@ function handleShare(): void {
|
|
|
382
413
|
|
|
383
414
|
콘텐츠 이미지:
|
|
384
415
|
조건: imageRef 있음 + 독립적 크기 + TEXT 형제 없음
|
|
385
|
-
매핑: width/height
|
|
416
|
+
매핑: width/height → vw 변환
|
|
386
417
|
태그: <img alt="가장 가까운 TEXT 노드의 characters" />
|
|
387
418
|
|
|
388
419
|
장식 이미지:
|
|
@@ -392,7 +423,7 @@ function handleShare(): void {
|
|
|
392
423
|
|
|
393
424
|
아이콘:
|
|
394
425
|
조건: VECTOR/GROUP + 크기 ≤ 64px
|
|
395
|
-
매핑: width/height
|
|
426
|
+
매핑: width/height → vw 변환
|
|
396
427
|
태그: <img alt="기능 설명" /> 또는 인라인 SVG
|
|
397
428
|
```
|
|
398
429
|
|
|
@@ -42,13 +42,22 @@ line-height, letter-spacing, text-align, border, border-radius,
|
|
|
42
42
|
box-shadow, opacity, mix-blend-mode, filter, backdrop-filter
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
##
|
|
45
|
+
## 반응형 단위 변환 (scaleFactor 사용하지 않음)
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
font-size, padding, margin, gap, width, height, border-radius,
|
|
49
|
-
border-width, box-shadow px, filter px, letter-spacing
|
|
47
|
+
스토리보드 CONFIG에서 designWidth, minWidth 확보.
|
|
50
48
|
|
|
51
|
-
|
|
49
|
+
**UI 요소 → vw 비례:**
|
|
50
|
+
vw값 = (Figma px / designWidth) × 100
|
|
51
|
+
적용: width, height, padding, gap, margin, border-radius,
|
|
52
|
+
border-width, box-shadow px, filter px, letter-spacing
|
|
53
|
+
|
|
54
|
+
**폰트 → clamp(최소, vw, 최대):**
|
|
55
|
+
vw값 = (Figma px / designWidth) × 100
|
|
56
|
+
최소값 = 역할에 따라 결정:
|
|
57
|
+
h1~h2: 16px, h3~h4: 14px, 본문: 12px, 캡션: 10px, 버튼: 12px
|
|
58
|
+
최대값 = Figma 원본 px
|
|
59
|
+
|
|
60
|
+
**변환하지 않는 속성:**
|
|
52
61
|
color, opacity, font-weight, font-family, z-index,
|
|
53
62
|
line-height(단위 없을 때), text-align, mix-blend-mode,
|
|
54
63
|
rotate, % 값
|
|
@@ -75,48 +75,46 @@ defineProps<{
|
|
|
75
75
|
|
|
76
76
|
---
|
|
77
77
|
|
|
78
|
-
## SCSS Layout (tree.json
|
|
78
|
+
## SCSS Layout (tree.json → vw 반응형)
|
|
79
79
|
|
|
80
80
|
```scss
|
|
81
81
|
// tree.json 데이터:
|
|
82
82
|
// {{SECTION_NAME}}: { width:{{WIDTH}}, height:{{HEIGHT}}, overflow:hidden }
|
|
83
83
|
// {{CHILD_1}}: { display:flex, flexDirection:column, gap:{{GAP}}px, padding:"{{PADDING}}" }
|
|
84
|
-
//
|
|
84
|
+
// designWidth = {{DESIGN_WIDTH}}px → vw = (px / designWidth) × 100
|
|
85
85
|
|
|
86
86
|
.{{sectionName}} {
|
|
87
87
|
position: relative;
|
|
88
88
|
width: 100%;
|
|
89
|
-
height: {{
|
|
89
|
+
height: {{HEIGHT_VW}}vw; // tree: {{HEIGHT}} / {{DESIGN_WIDTH}} × 100
|
|
90
90
|
overflow: hidden; // tree: overflow:hidden
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
position: absolute;
|
|
95
|
-
inset: 0;
|
|
96
|
-
z-index: 0;
|
|
97
|
-
img { width: 100%; height: 100%; object-fit: cover; }
|
|
91
|
+
background-image: url('/images/{{FEATURE_KEY}}/{{section}}-bg.png');
|
|
92
|
+
background-size: cover;
|
|
93
|
+
background-position: center top;
|
|
98
94
|
}
|
|
99
95
|
|
|
100
96
|
.{{sectionName}}__{{child1Name}} {
|
|
101
97
|
display: flex; // tree: display:flex
|
|
102
98
|
flex-direction: column; // tree: flexDirection:column
|
|
103
|
-
gap: {{
|
|
104
|
-
padding: {{
|
|
99
|
+
gap: {{GAP_VW}}vw; // tree: {{GAP}} / {{DESIGN_WIDTH}} × 100
|
|
100
|
+
padding: {{PADDING_VW}}; // tree: "{{PADDING}}" / {{DESIGN_WIDTH}} × 100
|
|
105
101
|
}
|
|
106
102
|
```
|
|
107
103
|
|
|
108
104
|
---
|
|
109
105
|
|
|
110
|
-
## SCSS Components (tree.json
|
|
106
|
+
## SCSS Components (tree.json → clamp 폰트)
|
|
111
107
|
|
|
112
108
|
```scss
|
|
113
109
|
// tree.json 데이터:
|
|
114
110
|
// TEXT "{{TEXT_1}}": { fontSize:{{FONT_SIZE}}px, fontWeight:{{FONT_WEIGHT}}, color:{{COLOR}} }
|
|
111
|
+
// designWidth = {{DESIGN_WIDTH}}px
|
|
115
112
|
|
|
116
113
|
.{{sectionName}}__title {
|
|
117
|
-
|
|
118
|
-
font-
|
|
119
|
-
|
|
114
|
+
// 역할: 제목 → 최소 16px
|
|
115
|
+
font-size: clamp(16px, {{FONT_SIZE_VW}}vw, {{FONT_SIZE}}px); // tree: {{FONT_SIZE}} / {{DESIGN_WIDTH}} × 100
|
|
116
|
+
font-weight: {{FONT_WEIGHT}}; // tree: 직접 (변환 안 함)
|
|
117
|
+
color: {{COLOR}}; // tree: 직접 (변환 안 함)
|
|
120
118
|
}
|
|
121
119
|
```
|
|
122
120
|
|
|
@@ -42,7 +42,7 @@ Bash:
|
|
|
42
42
|
|
|
43
43
|
트리 데이터의 용도 (vibe.figma.convert에서 직접 매핑):
|
|
44
44
|
- Auto Layout → CSS Flexbox (direction, gap, padding, align 1:1)
|
|
45
|
-
- absoluteBoundingBox → width, height (
|
|
45
|
+
- absoluteBoundingBox → width, height (→ vw 변환)
|
|
46
46
|
- fills/strokes/effects → background, border, shadow 등
|
|
47
47
|
- TEXT 노드 → 텍스트 콘텐츠 + 타이포그래피 CSS
|
|
48
48
|
- imageRef → 이미지 에셋 매핑
|
|
@@ -53,7 +53,7 @@ Bash:
|
|
|
53
53
|
|
|
54
54
|
트리 추출 도구가 자동 변환하는 속성. **이 값들이 SCSS에 직접 매핑된다:**
|
|
55
55
|
|
|
56
|
-
| Figma 속성 | CSS |
|
|
56
|
+
| Figma 속성 | CSS | vw 변환 |
|
|
57
57
|
|-----------|-----|-----------------|
|
|
58
58
|
| `layoutMode=VERTICAL` | `display:flex; flex-direction:column` | ❌ |
|
|
59
59
|
| `layoutMode=HORIZONTAL` | `display:flex; flex-direction:row` | ❌ |
|
|
@@ -1,67 +1,89 @@
|
|
|
1
|
-
# Image Extraction Rules
|
|
1
|
+
# Image Extraction Rules — Node Rendering Based
|
|
2
2
|
|
|
3
|
-
##
|
|
4
|
-
|
|
5
|
-
- Output format: `.webp` always — never `.png`, `.jpg`, `.svg` from MCP asset URLs
|
|
6
|
-
- Exception: SVG icons referenced as inline code (not MCP URLs) stay as `.svg`
|
|
7
|
-
- Do not convert or re-encode after download — use the raw bytes from `curl`
|
|
3
|
+
## Core Principle
|
|
8
4
|
|
|
9
|
-
|
|
5
|
+
```
|
|
6
|
+
❌ imageRef 개별 다운로드 금지 (텍스처 fill 공유 문제)
|
|
7
|
+
✅ 모든 이미지는 Figma screenshot API로 노드 렌더링
|
|
8
|
+
```
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
## Render Methods
|
|
12
11
|
|
|
13
|
-
|
|
|
14
|
-
|
|
15
|
-
| `
|
|
16
|
-
|
|
|
17
|
-
| `
|
|
18
|
-
| `imgImgBannerStatic` | `banner-static.webp` (collapse double `img`) |
|
|
19
|
-
| `imgBtnShare` | `btn-share.webp` |
|
|
12
|
+
| 이미지 유형 | 렌더링 방법 | 출력 위치 |
|
|
13
|
+
|-----------|-----------|---------|
|
|
14
|
+
| BG 프레임 (합성 배경) | `screenshot {fileKey} {bg.nodeId}` | `bg/{section}-bg.png` |
|
|
15
|
+
| 콘텐츠 (타이틀, 버튼) | `screenshot {fileKey} {node.nodeId}` | `content/{name}.png` |
|
|
16
|
+
| 벡터 글자 그룹 | `screenshot {fileKey} {group.nodeId}` | `content/{name}.png` |
|
|
20
17
|
|
|
21
|
-
|
|
22
|
-
- Strip leading `img` prefix before converting to kebab-case
|
|
23
|
-
- Numbers stay as-is: `item11` → `item-11`
|
|
24
|
-
- Acronyms lowercased: `BTN` → `btn`, `BG` → `bg`
|
|
18
|
+
## BG 프레임 판별
|
|
25
19
|
|
|
26
|
-
|
|
20
|
+
```
|
|
21
|
+
BG 프레임 = 다음 중 하나:
|
|
22
|
+
- name에 "BG", "bg" 포함
|
|
23
|
+
- 부모와 크기 동일(±10%) + 자식 이미지 3개 이상
|
|
24
|
+
- 1depth 첫 번째 자식이면서 이미지 노드 다수 보유
|
|
27
25
|
|
|
26
|
+
→ 프레임 렌더링 1장 → CSS background-image
|
|
27
|
+
→ 하위 개별 레이어 다운로드하지 않음
|
|
28
28
|
```
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
|
|
30
|
+
## 벡터 글자 판별
|
|
31
|
+
|
|
32
32
|
```
|
|
33
|
+
벡터 글자 그룹 = 다음 모두 충족:
|
|
34
|
+
- 부모 GROUP/FRAME 아래 VECTOR 타입 3개 이상
|
|
35
|
+
- 각 VECTOR 크기 < 60x60
|
|
36
|
+
- 같은 imageRef 공유 (텍스처 fill)
|
|
33
37
|
|
|
34
|
-
|
|
38
|
+
→ 부모 GROUP 통째로 렌더링 (개별 글자 다운로드 금지)
|
|
39
|
+
→ 커스텀 폰트 텍스트 = 웹폰트 없음 → 이미지로 사용
|
|
40
|
+
```
|
|
35
41
|
|
|
36
|
-
##
|
|
42
|
+
## Format
|
|
37
43
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
| Background image | 500 KB | 2 MB |
|
|
41
|
-
| Content image | 200 KB | 1 MB |
|
|
42
|
-
| Decorative image | 100 KB | 500 KB |
|
|
43
|
-
| Total per section | 3 MB | 10 MB |
|
|
44
|
+
- Output format: `.png` (Figma screenshot API 기본)
|
|
45
|
+
- 최적화 필요 시 빌드 단계에서 webp 변환 (추출 단계에서는 png)
|
|
44
46
|
|
|
45
|
-
|
|
47
|
+
## Naming
|
|
46
48
|
|
|
47
|
-
|
|
49
|
+
렌더링된 이미지의 파일명 = Figma 노드 name을 kebab-case로:
|
|
50
|
+
- `"Hero"` BG frame → `hero-bg.png`
|
|
51
|
+
- `"Mission 01"` vector group → `mission-01.png`
|
|
52
|
+
- `"Title"` content → `hero-title.png` (섹션명 prefix)
|
|
53
|
+
- `"Btn_Login"` → `btn-login.png`
|
|
48
54
|
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
55
|
+
Rules:
|
|
56
|
+
- 공백 → 하이픈
|
|
57
|
+
- 언더스코어 → 하이픈
|
|
58
|
+
- 숫자 유지: `item11` → `item-11`
|
|
59
|
+
- 대문자 → 소문자
|
|
54
60
|
|
|
55
|
-
##
|
|
61
|
+
## Destination
|
|
56
62
|
|
|
57
|
-
|
|
63
|
+
```
|
|
64
|
+
/tmp/{feature}/{bp-folder}/
|
|
65
|
+
bg/ ← BG 프레임 렌더링
|
|
66
|
+
content/ ← 콘텐츠 + 벡터 글자 렌더링
|
|
67
|
+
sections/ ← Phase 4 검증용 스크린샷
|
|
68
|
+
```
|
|
58
69
|
|
|
59
|
-
|
|
60
|
-
const imageMap = {
|
|
61
|
-
imgTitle: '/images/{feature}/title.webp',
|
|
62
|
-
img21: '/images/{feature}/img-21.webp',
|
|
63
|
-
// ...every variable
|
|
64
|
-
}
|
|
70
|
+
최종 배치 (Phase 5):
|
|
65
71
|
```
|
|
72
|
+
static/images/{feature}/ ← Nuxt 2
|
|
73
|
+
public/images/{feature}/ ← Vue/Nuxt 3
|
|
74
|
+
public/{feature}/ ← Next.js
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Size Limits
|
|
78
|
+
|
|
79
|
+
| Type | Warn threshold | Action |
|
|
80
|
+
|------|---------------|--------|
|
|
81
|
+
| BG 렌더링 | 5 MB | 정상 (합성 이미지라 큰 게 정상) |
|
|
82
|
+
| 콘텐츠 렌더링 | 1 MB | 경고 |
|
|
83
|
+
| 단일 이미지 > 5 MB | — | ⚠️ 텍스처 fill 의심 → imageRef 다운로드 실수 확인 |
|
|
84
|
+
|
|
85
|
+
## Fallback
|
|
66
86
|
|
|
67
|
-
|
|
87
|
+
노드 렌더링 불가 시에만 imageRef 다운로드:
|
|
88
|
+
- Figma screenshot API 실패 (rate limit, 권한)
|
|
89
|
+
- 다운로드 후 파일 크기 5MB 초과 → 텍스처 fill 가능성 → 경고 로그
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# Analysis Dimensions — Figma Design Analysis
|
|
2
|
-
|
|
3
|
-
> This skill is merged into vibe.figma (Phase 1: Storyboard). These dimensions guide what to extract and evaluate when reading Figma frames.
|
|
4
|
-
|
|
5
|
-
## Layout
|
|
6
|
-
|
|
7
|
-
- [ ] Overall page structure — single column, multi-column, grid, or free-form absolute
|
|
8
|
-
- [ ] Section boundaries — identify where each distinct section starts/ends by visual grouping
|
|
9
|
-
- [ ] Container width — fixed px vs fluid (100%)
|
|
10
|
-
- [ ] Alignment system — centered, left-aligned, or asymmetric
|
|
11
|
-
- [ ] Z-layering — how many stacked layers exist (BG/content/overlay count)
|
|
12
|
-
- [ ] Overflow behavior — clip, hidden, visible, scroll
|
|
13
|
-
|
|
14
|
-
## Spacing Consistency
|
|
15
|
-
|
|
16
|
-
- [ ] Gap between sections — does a single spacing value repeat, or is each unique?
|
|
17
|
-
- [ ] Internal component padding — consistent across card variants?
|
|
18
|
-
- [ ] Icon-to-text gap — uniform within a component family?
|
|
19
|
-
- [ ] Recurring values — list values that appear 3+ times (these become spacing tokens)
|
|
20
|
-
- [ ] Irregular values — flag one-off spacings that may indicate design inconsistency
|
|
21
|
-
|
|
22
|
-
## Color Usage
|
|
23
|
-
|
|
24
|
-
- [ ] Background palette — how many distinct background colors exist?
|
|
25
|
-
- [ ] Text color roles — identify heading / body / label / disabled colors separately
|
|
26
|
-
- [ ] Accent/brand colors — primary CTA color, hover state color
|
|
27
|
-
- [ ] Transparency usage — rgba overlays, opacity layers
|
|
28
|
-
- [ ] Blend modes present — `mix-blend-lighten`, `multiply`, `hue` flag a literal-mode section
|
|
29
|
-
- [ ] Dark/light variants — does the design have both, requiring CSS variable tokens?
|
|
30
|
-
|
|
31
|
-
## Typography Hierarchy
|
|
32
|
-
|
|
33
|
-
- [ ] H1 equivalent — largest display text, font-size + weight + role
|
|
34
|
-
- [ ] H2 / section heading — size, weight, color
|
|
35
|
-
- [ ] Body text — base size, line-height, color
|
|
36
|
-
- [ ] Caption / label text — smallest size, usage context
|
|
37
|
-
- [ ] Font families — how many distinct families? Any variable fonts?
|
|
38
|
-
- [ ] Responsive scaling — does font-size change across breakpoints?
|
|
39
|
-
|
|
40
|
-
## Component Inventory
|
|
41
|
-
|
|
42
|
-
- [ ] Repeating UI patterns — cards, list items, tabs (candidates for `v-for`)
|
|
43
|
-
- [ ] State variants — default, hover, active, disabled, selected (note which states exist)
|
|
44
|
-
- [ ] Shared components — GNB, Footer, Popup (already in project or needs creation?)
|
|
45
|
-
- [ ] Interactive elements — buttons, links, inputs, toggles
|
|
46
|
-
- [ ] Decorative elements — particles, background shapes, overlay effects
|
|
47
|
-
|
|
48
|
-
## Storyboard-Specific Dimensions
|
|
49
|
-
|
|
50
|
-
- [ ] Frame classification — SPEC, CONFIG, SHARED, PAGE (by name pattern)
|
|
51
|
-
- [ ] Interaction annotations — arrows, overlay connections, state transitions in Figma
|
|
52
|
-
- [ ] Section count — total PAGE frames that need components
|
|
53
|
-
- [ ] Tall frames (1500px+) — flag for split strategy before `get_design_context`
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# Code Generation Quality Checklist
|
|
2
|
-
|
|
3
|
-
> This skill is merged into vibe.figma.convert. Use this checklist to validate generated component and style files before moving to the next section.
|
|
4
|
-
|
|
5
|
-
## Structure
|
|
6
|
-
|
|
7
|
-
- [ ] Component file exists at `components/{feature}/{ComponentName}.vue` (or `.tsx`)
|
|
8
|
-
- [ ] Template is not empty — at least one visible HTML element with content
|
|
9
|
-
- [ ] No `placeholder` text remaining in any attribute or text node
|
|
10
|
-
- [ ] No `src=""` or `href=""` empty attributes
|
|
11
|
-
|
|
12
|
-
## Assets
|
|
13
|
-
|
|
14
|
-
- [ ] All `const img...` variables from reference code are replaced with local `/images/{feature}/` paths
|
|
15
|
-
- [ ] No `figma.com/api` URLs in any generated file
|
|
16
|
-
- [ ] Every image path references a file that was actually downloaded (cross-check image map)
|
|
17
|
-
- [ ] Decorative images have `alt="" aria-hidden="true"`
|
|
18
|
-
- [ ] Content images have descriptive `alt` text
|
|
19
|
-
|
|
20
|
-
## Styles (Normal Mode)
|
|
21
|
-
|
|
22
|
-
- [ ] No `<style>` block inside the component file
|
|
23
|
-
- [ ] No inline `style=""` attribute (exception: dynamic `:style` for mask-image)
|
|
24
|
-
- [ ] External layout file exists at `styles/{feature}/layout/_{section}.scss`
|
|
25
|
-
- [ ] External components file exists at `styles/{feature}/components/_{section}.scss`
|
|
26
|
-
- [ ] `_tokens.scss` updated with any new unique color/spacing/typography values
|
|
27
|
-
|
|
28
|
-
## Styles (Literal Mode)
|
|
29
|
-
|
|
30
|
-
- [ ] `<style scoped>` block present in component
|
|
31
|
-
- [ ] No external SCSS files created for this section
|
|
32
|
-
- [ ] All `position: absolute` coordinates are scaled by scaleFactor
|
|
33
|
-
- [ ] `mix-blend-mode`, `rotate`, `blur`, `mask-image` values preserved verbatim
|
|
34
|
-
- [ ] `%` values not scaled (only `px` values are scaled)
|
|
35
|
-
|
|
36
|
-
## TypeScript / Script
|
|
37
|
-
|
|
38
|
-
- [ ] JSDoc comment present with `[기능 정의]`, `[인터랙션]`, `[상태]` sections
|
|
39
|
-
- [ ] No `any` type — use explicit interfaces or `unknown`
|
|
40
|
-
- [ ] Mock data arrays have 3–7 items (not empty `[]`)
|
|
41
|
-
- [ ] Event handler stubs exist with `// TODO:` body
|
|
42
|
-
- [ ] Explicit return types on all functions
|
|
43
|
-
|
|
44
|
-
## Responsive
|
|
45
|
-
|
|
46
|
-
- [ ] Base styles target the smallest viewport (mobile-first)
|
|
47
|
-
- [ ] Desktop overrides use `@media (min-width: {$bp-pc})` or the project mixin
|
|
48
|
-
- [ ] No existing base styles deleted when adding breakpoint overrides
|
|
49
|
-
|
|
50
|
-
## Build
|
|
51
|
-
|
|
52
|
-
- [ ] No TypeScript compile errors in the generated file
|
|
53
|
-
- [ ] No missing imports (components, composables, types)
|
|
54
|
-
- [ ] Template references only props/data/computed that are declared in `<script setup>`
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
# Consolidation Report — {{FEATURE_NAME}}
|
|
2
|
-
|
|
3
|
-
**Feature Key:** {{FEATURE_KEY}}
|
|
4
|
-
**Date:** {{DATE}}
|
|
5
|
-
**Phase:** Post-implementation verification
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Summary
|
|
10
|
-
|
|
11
|
-
| Metric | Value |
|
|
12
|
-
|--------|-------|
|
|
13
|
-
| Total sections | {{SECTION_COUNT}} |
|
|
14
|
-
| Sections passing | {{PASS_COUNT}} |
|
|
15
|
-
| P1 issues found | {{P1_COUNT}} |
|
|
16
|
-
| P2 issues found | {{P2_COUNT}} |
|
|
17
|
-
| Assets downloaded | {{ASSET_COUNT}} |
|
|
18
|
-
| Build status | {{BUILD_STATUS}} |
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## Automated Grep Results
|
|
23
|
-
|
|
24
|
-
| Check | Result | Details |
|
|
25
|
-
|-------|--------|---------|
|
|
26
|
-
| `figma.com/api` in generated files | {{PASS/FAIL}} | {{COUNT}} occurrences |
|
|
27
|
-
| `<style` in `components/{{FEATURE_KEY}}/` | {{PASS/FAIL}} | {{COUNT}} occurrences |
|
|
28
|
-
| `style="` in `components/{{FEATURE_KEY}}/` | {{PASS/FAIL}} | {{COUNT}} occurrences |
|
|
29
|
-
| `placeholder` in components | {{PASS/FAIL}} | {{COUNT}} occurrences |
|
|
30
|
-
| `src=""` in components | {{PASS/FAIL}} | {{COUNT}} occurrences |
|
|
31
|
-
| Images in `public/images/{{FEATURE_KEY}}/` | {{PASS/FAIL}} | {{COUNT}} files |
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## Section Review
|
|
36
|
-
|
|
37
|
-
| # | Section | Component | Mode | Screenshot Match | P1 | P2 |
|
|
38
|
-
|---|---------|-----------|------|-----------------|----|----|
|
|
39
|
-
| 1 | {{SECTION_NAME}} | `{{ComponentName}}.vue` | {{normal/literal}} | {{match %}} | {{count}} | {{count}} |
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## P1 Issues (Must Fix)
|
|
44
|
-
|
|
45
|
-
### {{SECTION_NAME}} — {{ISSUE_TITLE}}
|
|
46
|
-
|
|
47
|
-
**Type:** {{image-missing / layout-mismatch / text-unstyled / asset-wrong-path}}
|
|
48
|
-
**Description:** {{DESCRIPTION}}
|
|
49
|
-
**Fix:** {{FIX_INSTRUCTION}}
|
|
50
|
-
**Status:** {{open / fixed}}
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## P2 Issues (Recommended)
|
|
55
|
-
|
|
56
|
-
### {{SECTION_NAME}} — {{ISSUE_TITLE}}
|
|
57
|
-
|
|
58
|
-
**Type:** {{spacing-delta / color-delta / font-size-delta}}
|
|
59
|
-
**Description:** {{DESCRIPTION}} (delta: {{DELTA}})
|
|
60
|
-
**Fix:** {{FIX_INSTRUCTION}}
|
|
61
|
-
**Status:** {{open / deferred}}
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
## File Manifest
|
|
66
|
-
|
|
67
|
-
### Components
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
components/{{FEATURE_KEY}}/
|
|
71
|
-
{{FILE_LIST}}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Styles
|
|
75
|
-
|
|
76
|
-
```
|
|
77
|
-
styles/{{FEATURE_KEY}}/
|
|
78
|
-
{{FILE_LIST}}
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### Assets
|
|
82
|
-
|
|
83
|
-
```
|
|
84
|
-
public/images/{{FEATURE_KEY}}/
|
|
85
|
-
{{FILE_LIST}}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## Next Steps
|
|
91
|
-
|
|
92
|
-
- [ ] P1 count = 0 (required before handoff)
|
|
93
|
-
- [ ] Run `/design-normalize` → `/design-audit --quick`
|
|
94
|
-
- [ ] Optional: `/design-critique` → `/design-polish` for thorough review
|
|
95
|
-
- [ ] Commit with feature key tag: `feat({{FEATURE_KEY}}): figma design implementation`
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# Frame Selection Rubric
|
|
2
|
-
|
|
3
|
-
> This skill is merged into vibe.figma.extract. Use this rubric to select the right frames before calling `get_design_context`.
|
|
4
|
-
|
|
5
|
-
## Frame Classification by Name Pattern
|
|
6
|
-
|
|
7
|
-
| Pattern in Name | Class | Action |
|
|
8
|
-
|----------------|-------|--------|
|
|
9
|
-
| "기능 정의서", "정책", "spec", "policy" | SPEC | `get_design_context` — extract text requirements |
|
|
10
|
-
| "해상도", "브라우저", "config", "resolution" | CONFIG | `get_design_context` — extract scale factor |
|
|
11
|
-
| "공통", "GNB", "Footer", "Popup", "shared", "common" | SHARED | Read if referenced; skip if project already has them |
|
|
12
|
-
| "화면설계", "메인 -", "section", numbered frames | PAGE | Core implementation targets |
|
|
13
|
-
|
|
14
|
-
## Selection Priority
|
|
15
|
-
|
|
16
|
-
1. SPEC frame (1 frame) — read first, informs all feature requirements
|
|
17
|
-
2. CONFIG frame (1 frame) — establishes scale factors for both breakpoints
|
|
18
|
-
3. PAGE frames — top-level only (e.g. `3.1`, `3.2`, not `3.1.1`, `3.1.2`)
|
|
19
|
-
4. SHARED frames — only if component does not already exist in the project
|
|
20
|
-
|
|
21
|
-
Never read sub-case frames (e.g. `3.1.1`, `3.2.1`) during Phase 1. Read them in Phase 2 only if a sub-state is needed for a specific interaction.
|
|
22
|
-
|
|
23
|
-
## Tall Frame Decision Tree
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
Frame height > 1500px?
|
|
27
|
-
YES → Split before calling get_design_context
|
|
28
|
-
1. get_metadata(nodeId) → get child node list
|
|
29
|
-
2. Call get_design_context per child node
|
|
30
|
-
3. Merge results as one logical section
|
|
31
|
-
NO → Call get_design_context directly
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Height thresholds from real data:
|
|
35
|
-
- Safe direct call: up to ~900px
|
|
36
|
-
- Risk zone: 900–1500px (attempt once, split on timeout)
|
|
37
|
-
- Always split: 1500px+
|
|
38
|
-
|
|
39
|
-
## Skipping Frames
|
|
40
|
-
|
|
41
|
-
Skip a frame entirely when:
|
|
42
|
-
- Name contains "OLD", "archive", "deprecated", "참고", "예시" (reference only)
|
|
43
|
-
- Frame is a copy/duplicate of another already processed frame
|
|
44
|
-
- Frame is a component definition (Figma component, not an instance) — use its instances instead
|
|
45
|
-
|
|
46
|
-
## Viewport Frames
|
|
47
|
-
|
|
48
|
-
When multiple frames represent the same section at different widths:
|
|
49
|
-
- Smallest width = mobile (Phase 2 base URL)
|
|
50
|
-
- Larger widths = desktop breakpoints (Phase 2 subsequent URLs)
|
|
51
|
-
- Process mobile first, then add desktop as responsive layer — never the reverse
|
|
52
|
-
|
|
53
|
-
## Frame Count Warning
|
|
54
|
-
|
|
55
|
-
If total PAGE frames > 10, confirm with the user before proceeding. Large frame counts may indicate the Figma file covers multiple pages that should be separate feature implementations.
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: vibe.figma.pipeline
|
|
3
|
-
description: "[Merged] → vibe.figma.consolidate D-4 참조"
|
|
4
|
-
triggers: []
|
|
5
|
-
tier: standard
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# vibe.figma.pipeline
|
|
9
|
-
|
|
10
|
-
이 스킬은 **vibe.figma.consolidate** D-4 섹션으로 병합되었습니다.
|
|
11
|
-
Design Quality Pipeline 안내는 `vibe.figma.consolidate` Step D-4를 참조하세요.
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
# Pipeline Stage Descriptions and Failure Handling
|
|
2
|
-
|
|
3
|
-
> This skill is merged into vibe.figma.consolidate (D-4). This rubric describes each stage of the Figma-to-code pipeline and what to do when a stage fails.
|
|
4
|
-
|
|
5
|
-
## Stage Map
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
Phase 0: Setup
|
|
9
|
-
└─ Detect stack → Determine feature key → Create directories
|
|
10
|
-
|
|
11
|
-
Phase 1: Storyboard
|
|
12
|
-
└─ Classify frames → Analyze SPEC/CONFIG/PAGE → Generate component shells
|
|
13
|
-
|
|
14
|
-
Phase 2: Design (per breakpoint)
|
|
15
|
-
├─ 2-1: Style scaffold
|
|
16
|
-
├─ 2-2: Classify mode (normal/literal) per section
|
|
17
|
-
├─ 2-3: Split tall frames if needed
|
|
18
|
-
└─ 2-4: Section loop
|
|
19
|
-
├─ a. get_design_context
|
|
20
|
-
├─ b. Download all assets
|
|
21
|
-
├─ c. Convert code
|
|
22
|
-
├─ d. Refactor component template
|
|
23
|
-
└─ e. Verify section
|
|
24
|
-
|
|
25
|
-
Phase 3: Verification
|
|
26
|
-
├─ Automated grep checks
|
|
27
|
-
└─ Screenshot comparison
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Stage Failure Handling
|
|
31
|
-
|
|
32
|
-
### Phase 0 Failures
|
|
33
|
-
|
|
34
|
-
| Failure | Resolution |
|
|
35
|
-
|---------|-----------|
|
|
36
|
-
| Cannot detect stack | Ask user: "Vue or React? SCSS or Tailwind?" |
|
|
37
|
-
| Directory already exists | Proceed — do not overwrite existing files unless replacing |
|
|
38
|
-
|
|
39
|
-
### Phase 1 Failures
|
|
40
|
-
|
|
41
|
-
| Failure | Resolution |
|
|
42
|
-
|---------|-----------|
|
|
43
|
-
| Metadata too large (>100K chars) | Save to file, parse with Bash/Python to extract frame list |
|
|
44
|
-
| No SPEC frame found | Continue without feature requirements; note missing in report |
|
|
45
|
-
| No CONFIG frame | Use default scale factors (mobile: 480/720=0.667, PC: 1920/2560=0.75) |
|
|
46
|
-
| Storyboard URL is "없음" | Skip Phase 1, go directly to Phase 2 |
|
|
47
|
-
|
|
48
|
-
### Phase 2-a Failures (get_design_context)
|
|
49
|
-
|
|
50
|
-
| Failure | Retry | Escalation |
|
|
51
|
-
|---------|-------|-----------|
|
|
52
|
-
| Timeout on first call | Retry once with `excludeScreenshot: true` | Split frame → per-child calls |
|
|
53
|
-
| Timeout after split | Retry individual child once | `get_screenshot` + visual estimation |
|
|
54
|
-
| Empty response | Retry once | Skip section, log in consolidation report |
|
|
55
|
-
|
|
56
|
-
Maximum retries per section: 2. After 2 failures: use screenshot fallback. Never loop more than 3 times on the same section.
|
|
57
|
-
|
|
58
|
-
### Phase 2-b Failures (Asset Download)
|
|
59
|
-
|
|
60
|
-
| Failure | Resolution |
|
|
61
|
-
|---------|-----------|
|
|
62
|
-
| 0-byte file | Retry once with same curl command |
|
|
63
|
-
| 404 URL | Try `get_metadata` → sub-node → `get_design_context` for fresh URL |
|
|
64
|
-
| All retries failed | Log missing asset; continue with other assets; mark section as needs-review |
|
|
65
|
-
|
|
66
|
-
Single asset failure does not block the entire section unless it is a critical background image.
|
|
67
|
-
|
|
68
|
-
### Phase 2-e Section Verification Failures
|
|
69
|
-
|
|
70
|
-
| Check Failed | Action |
|
|
71
|
-
|-------------|--------|
|
|
72
|
-
| Figma URL in output | Find and replace all occurrences; re-verify |
|
|
73
|
-
| 0-byte or missing image | Re-download; if impossible, use placeholder only with TODO comment |
|
|
74
|
-
| Empty template | Do not proceed to next section until fixed |
|
|
75
|
-
| Build error | Fix TypeScript/template error; re-build |
|
|
76
|
-
|
|
77
|
-
### Phase 3 Failures (Screenshot Comparison)
|
|
78
|
-
|
|
79
|
-
| Priority | Issue Type | Action |
|
|
80
|
-
|----------|-----------|--------|
|
|
81
|
-
| P1 | Image missing, wrong layout, unstyled text | Fix immediately; re-verify before continuing |
|
|
82
|
-
| P2 | Spacing delta, slight color difference | Fix if time allows; defer if P1=0 and deadline is tight |
|
|
83
|
-
| P3 | Pixel-perfect micro-adjustments | Deferred to `/design-polish` pass |
|
|
84
|
-
|
|
85
|
-
P1 = 0 is required before the feature is considered complete. P2/P3 are best-effort.
|
|
86
|
-
|
|
87
|
-
## Design Quality Pipeline (Post-completion)
|
|
88
|
-
|
|
89
|
-
```
|
|
90
|
-
/design-normalize → normalize inconsistent values
|
|
91
|
-
/design-audit → automated audit (quick pass)
|
|
92
|
-
/design-critique → thorough visual critique
|
|
93
|
-
/design-polish → final polish pass
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
Run at minimum: `/design-normalize` → `/design-audit --quick` before committing.
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
# Figma Layer Naming Conventions for Clean Extraction
|
|
2
|
-
|
|
3
|
-
> This skill is inlined into vibe.figma, vibe.figma.extract, and vibe.figma.convert. This rubric documents how Figma layer names map to generated code identifiers.
|
|
4
|
-
|
|
5
|
-
## Layer Name → CSS Class
|
|
6
|
-
|
|
7
|
-
Convert `data-name` attribute values from reference code to CSS class names:
|
|
8
|
-
|
|
9
|
-
| Figma Layer Name | CSS Class | Notes |
|
|
10
|
-
|-----------------|-----------|-------|
|
|
11
|
-
| `BG` | `.bg` | Lowercase single word |
|
|
12
|
-
| `Title` | `.title` | PascalCase → camelCase |
|
|
13
|
-
| `Period` | `.period` | |
|
|
14
|
-
| `Light` | `.light` | |
|
|
15
|
-
| `BTN_Share` | `.btnShare` | `BTN_` prefix → `btn`, underscore → camelCase |
|
|
16
|
-
| `BTN_Primary` | `.btnPrimary` | |
|
|
17
|
-
| `KV` (Key Visual) | `.kv` | Acronym → all lowercase |
|
|
18
|
-
| `GNB` | `.gnb` | |
|
|
19
|
-
| `PC_Banner` | `.pcBanner` | |
|
|
20
|
-
| `Snow_Particle_12` | `.snowParticle12` | Underscore-separated → camelCase |
|
|
21
|
-
| *(no data-name)* | `.node-{nodeId}` | Replace `:` with `-` in nodeId |
|
|
22
|
-
|
|
23
|
-
## Conflict Resolution
|
|
24
|
-
|
|
25
|
-
When two layers in the same section share the same name:
|
|
26
|
-
- Prefix with parent layer name: `.heroLight`, `.kidLight`
|
|
27
|
-
- Or append an index suffix: `.light-1`, `.light-2`
|
|
28
|
-
- Never generate duplicate class names in the same `<style scoped>` block
|
|
29
|
-
|
|
30
|
-
## Image Variable Name → File Name
|
|
31
|
-
|
|
32
|
-
| Figma Variable | File Name | Rule |
|
|
33
|
-
|---------------|-----------|------|
|
|
34
|
-
| `imgTitle` | `title.webp` | Strip `img` prefix, kebab-case |
|
|
35
|
-
| `img21` | `img-21.webp` | Numeric suffix: keep number |
|
|
36
|
-
| `imgSnowParticle12` | `snow-particle-12.webp` | CamelCase → kebab |
|
|
37
|
-
| `imgImgBannerStatic` | `banner-static.webp` | Double `img` prefix → strip both |
|
|
38
|
-
| `imgBtnShare` | `btn-share.webp` | |
|
|
39
|
-
|
|
40
|
-
## Component File Naming
|
|
41
|
-
|
|
42
|
-
| Figma Section Name | Component File |
|
|
43
|
-
|-------------------|----------------|
|
|
44
|
-
| "Hero" / "히어로" | `HeroSection.vue` |
|
|
45
|
-
| "Daily Check-in" / "일일 출석" | `DailyCheckInSection.vue` |
|
|
46
|
-
| "Play Time Mission" | `PlayTimeMissionSection.vue` |
|
|
47
|
-
| "Exchange" / "교환" | `ExchangeSection.vue` |
|
|
48
|
-
| "Popup" | `RewardPopup.vue` (non-section suffix) |
|
|
49
|
-
| "GNB" | `TheGnb.vue` (project-wide shared) |
|
|
50
|
-
|
|
51
|
-
Rules:
|
|
52
|
-
- PascalCase always
|
|
53
|
-
- Append `Section` suffix for page sections
|
|
54
|
-
- No `Section` suffix for popups, overlays, shared layout components
|
|
55
|
-
|
|
56
|
-
## Feature Key (Directory Name)
|
|
57
|
-
|
|
58
|
-
Derived from Figma file name:
|
|
59
|
-
|
|
60
|
-
| Figma File Name | Feature Key |
|
|
61
|
-
|----------------|-------------|
|
|
62
|
-
| "PUBG 겨울 PC방 이벤트" | `winter-pcbang` |
|
|
63
|
-
| "Summer Campaign 2025" | `summer-campaign-2025` |
|
|
64
|
-
| "Login Page Redesign" | `login-page-redesign` |
|
|
65
|
-
|
|
66
|
-
Rules:
|
|
67
|
-
- kebab-case
|
|
68
|
-
- Remove language/brand prefixes if obvious from context
|
|
69
|
-
- Numbers and years are kept
|
|
70
|
-
- No special characters
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
# Figma Style → CSS/Tailwind Mapping Rules
|
|
2
|
-
|
|
3
|
-
> This skill is merged into vibe.figma.convert. This rubric is the definitive reference for converting Figma design values to output CSS.
|
|
4
|
-
|
|
5
|
-
## Scale Factor Application
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
scaledValue = Math.round(figmaValue × scaleFactor)
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Apply to: `px` units only (font-size, padding, margin, gap, width, height, top, left, inset, border-radius, box-shadow offsets, letter-spacing, blur radius).
|
|
12
|
-
|
|
13
|
-
Never apply to: colors, opacity, unitless line-height, `%` values, z-index, degrees.
|
|
14
|
-
|
|
15
|
-
## Color Mapping
|
|
16
|
-
|
|
17
|
-
| Figma Token / Tailwind | CSS Output | Token Name |
|
|
18
|
-
|-----------------------|-----------|-----------|
|
|
19
|
-
| `text-[#1B3A1D]` | `color: #1B3A1D` | `$color-heading` |
|
|
20
|
-
| `text-white` | `color: #FFFFFF` | `$color-white` |
|
|
21
|
-
| `bg-[#0A1628]` | `background-color: #0A1628` | `$color-bg-dark` |
|
|
22
|
-
| `bg-[rgba(13,40,61,0.5)]` | `background: rgba(13,40,61,0.5)` | *(inline, no token)* |
|
|
23
|
-
| `var(--color/grayscale/950,#171716)` | `color: #171716` | Use fallback value |
|
|
24
|
-
| `border-[#E5E7EB]` | `border-color: #E5E7EB` | `$color-border` |
|
|
25
|
-
|
|
26
|
-
Create a `$color-*` token for any hex value that appears in 2+ selectors.
|
|
27
|
-
|
|
28
|
-
## Typography Mapping
|
|
29
|
-
|
|
30
|
-
| Figma / Tailwind | CSS Property | Scale? |
|
|
31
|
-
|-----------------|-------------|--------|
|
|
32
|
-
| `text-[48px]` | `font-size: 48px × SF` | Yes |
|
|
33
|
-
| `font-black` | `font-weight: 900` | No |
|
|
34
|
-
| `font-bold` | `font-weight: 700` | No |
|
|
35
|
-
| `font-semibold` | `font-weight: 600` | No |
|
|
36
|
-
| `font-medium` | `font-weight: 500` | No |
|
|
37
|
-
| `font-normal` | `font-weight: 400` | No |
|
|
38
|
-
| `leading-[1.4]` | `line-height: 1.4` | No (unitless) |
|
|
39
|
-
| `leading-[48px]` | `line-height: 48px × SF` | Yes (has unit) |
|
|
40
|
-
| `tracking-[-0.36px]` | `letter-spacing: -0.36px × SF` | Yes |
|
|
41
|
-
| `text-center` | `text-align: center` | No |
|
|
42
|
-
| `whitespace-nowrap` | `white-space: nowrap` | No |
|
|
43
|
-
| `font-[family-name:var(--font/family/pretendard,...)]` | `font-family: 'Pretendard', sans-serif` | No |
|
|
44
|
-
|
|
45
|
-
## Spacing Mapping
|
|
46
|
-
|
|
47
|
-
| Tailwind | CSS | Scale? |
|
|
48
|
-
|---------|-----|--------|
|
|
49
|
-
| `pt-[120px]` | `padding-top: 120px × SF` | Yes |
|
|
50
|
-
| `px-[24px]` | `padding-left: 24px × SF; padding-right: 24px × SF` | Yes |
|
|
51
|
-
| `gap-[24px]` | `gap: 24px × SF` | Yes |
|
|
52
|
-
| `mt-[16px]` | `margin-top: 16px × SF` | Yes |
|
|
53
|
-
| `rounded-[12px]` | `border-radius: 12px × SF` | Yes |
|
|
54
|
-
| `inset-0` | `inset: 0` | No |
|
|
55
|
-
| `inset-[-18.13%]` | `inset: -18.13%` | No (%) |
|
|
56
|
-
|
|
57
|
-
## Layout Mapping
|
|
58
|
-
|
|
59
|
-
| Tailwind | CSS |
|
|
60
|
-
|---------|-----|
|
|
61
|
-
| `flex` | `display: flex` |
|
|
62
|
-
| `flex-col` | `flex-direction: column` |
|
|
63
|
-
| `items-center` | `align-items: center` |
|
|
64
|
-
| `justify-center` | `justify-content: center` |
|
|
65
|
-
| `justify-between` | `justify-content: space-between` |
|
|
66
|
-
| `grid` | `display: grid` |
|
|
67
|
-
| `absolute` | `position: absolute` |
|
|
68
|
-
| `relative` | `position: relative` |
|
|
69
|
-
| `overflow-clip` | `overflow: clip` ← not `overflow: hidden` |
|
|
70
|
-
| `overflow-hidden` | `overflow: hidden` |
|
|
71
|
-
| `size-full` | `width: 100%; height: 100%` |
|
|
72
|
-
| `w-full` | `width: 100%` |
|
|
73
|
-
| `max-w-none` | `max-width: none` |
|
|
74
|
-
| `z-[10]` | `z-index: 10` |
|
|
75
|
-
| `pointer-events-none` | `pointer-events: none` |
|
|
76
|
-
|
|
77
|
-
## Visual Effects Mapping
|
|
78
|
-
|
|
79
|
-
| Tailwind | CSS | Scale? |
|
|
80
|
-
|---------|-----|--------|
|
|
81
|
-
| `opacity-40` | `opacity: 0.4` | No |
|
|
82
|
-
| `blur-[3.5px]` | `filter: blur(3.5px)` | Yes |
|
|
83
|
-
| `mix-blend-lighten` | `mix-blend-mode: lighten` | No |
|
|
84
|
-
| `mix-blend-multiply` | `mix-blend-mode: multiply` | No |
|
|
85
|
-
| `mix-blend-hue` | `mix-blend-mode: hue` | No |
|
|
86
|
-
| `rotate-[149.7deg]` | `transform: rotate(149.7deg)` | No |
|
|
87
|
-
| `-scale-y-100` | `transform: scaleY(-1)` | No |
|
|
88
|
-
| `shadow-[0_4px_24px_rgba(0,0,0,0.4)]` | `box-shadow: 0 4px × SF 24px × SF rgba(0,0,0,0.4)` | Partial (px only) |
|
|
89
|
-
| `object-cover` | `object-fit: cover` | No |
|
|
90
|
-
| `object-contain` | `object-fit: contain` | No |
|
|
91
|
-
|
|
92
|
-
## Token Promotion Rules
|
|
93
|
-
|
|
94
|
-
Promote a value to `_tokens.scss` when:
|
|
95
|
-
- A color appears in 2+ different selectors
|
|
96
|
-
- A font-size serves a named role (heading, body, caption)
|
|
97
|
-
- A spacing value appears in 3+ places
|
|
98
|
-
- A breakpoint threshold is used
|
|
99
|
-
|
|
100
|
-
Do not promote one-off values used in a single selector — write them inline.
|