`src/presentation/styles/theme.css`의 `@import "tailwindcss";`에 `source()`가
없어 Tailwind v4가 `.gitignore` 밖 파일을 모두 훑는다. 템플릿 TSX는 유틸리티
class를 쓰지 않고 `@apply`만 쓰는데, 빌드 CSS의 `@layer utilities`에 docs·
tests·scripts의 낱말에서 나온 규칙 35~40개(`.shadow\/canary`, `.sepia`,
`.cursor-not-allowed`, `.\!relative` 등)가 실린다. 모든 페이지가 기다리는 CSS가
약 0.7~0.9 KB gzip 커지고, 문서나 시험만 고친 release도 CSS 이름이 바뀌어
재방문자가 CSS를 다시 받는다.
고른 방법: `@import "tailwindcss" source("../../");`로 훑는 범위를 `src/`로
좁힌다. 제품이 `src/` 안의 className에 유틸리티를 쓰면 그대로 생긴다. 버린
대안: `source(none)`(제품이 유틸리티 class를 쓸 수 없어진다. 디자인 시스템
계약을 바꾸는 일이다).
위험·한계: 유틸리티 class를 `src/` 밖(예: `index.html`)에만 쓴 제품은 그
규칙을 잃는다. 템플릿에는 그런 곳이 없다.
검증: `tests/unit/design-system-initial-chunk.test.ts`의 새 사례가 src 밖
fixture(`tests/fixtures/tailwind-source/outside-src.txt`의
`outline-[3.21px]`)가 빌드 CSS에 없음을 본다. 고치기 전에 실패하고 고친 뒤
통과한다. 시각 골든은 FE-GATE-008이 본다(desktop, PR 본문).
Refs: 1112/06-03
theme.css (1435 lines) is now an import-order entry point: tailwind, the
three token files, then styles/theme/{base,shell,primitives,templates,
pages,responsive}.css holding the original rules verbatim and in the same
order (components-layer chunks each wrap their part in
`@layer components`). check-design-system now reads every CSS file under
styles/ so the undefined-token check still covers the moved rules; the
design-system doc names the new layout.
Verified: `corepack pnpm build` before and after produce the same CSS
asset, dist/assets/index-6KRF2bCu.css, byte-identical (cmp and sha256
bdaa8521...). A probe undefined token in theme/pages.css fails
check:design-system. Lane gates pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>