Conversation
…and declarations Classes Tailwind does not define stay in the className as written, a class with a variant the compiler does not understand is left unchanged instead of applying unconditionally, and utilities emit every declaration Tailwind v4 writes: multi-declaration utilities in full, translate/rotate/scale/skew through their own properties so they compose, and arbitrary values read with Tailwind's grammar. Template classNames keep text that runs into an interpolation attached to it. Refs #687 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…and composed utilities Refs #687 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Contributor
Changepacks@devup-ui/wasm@1.0.82 → 1.0.83 - bindings/devup-ui-wasm/package.jsonPatch
@devup-ui/bun-plugin@1.0.21 → 1.0.22 - packages/bun-plugin/package.jsonPatch
@devup-ui/components@0.1.59 → 0.1.60 - packages/components/package.jsonPatch
@devup-ui/eslint-plugin@1.0.21 → 1.0.22 - packages/eslint-plugin/package.jsonPatch
@devup-ui/next-plugin@1.0.89 → 1.0.90 - packages/next-plugin/package.jsonPatch
@devup-ui/plugin-utils@1.0.16 → 1.0.17 - packages/plugin-utils/package.jsonPatch
@devup-ui/rsbuild-plugin@1.0.66 → 1.0.67 - packages/rsbuild-plugin/package.jsonPatch
@devup-ui/vite-plugin@1.0.72 → 1.0.73 - packages/vite-plugin/package.jsonPatch
@devup-ui/webpack-plugin@1.0.70 → 1.0.71 - packages/webpack-plugin/package.jsonPatch
|
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #687 (B, 권장 항목 1부: TW-05, TW-07, TW-08, TW-09, TW-11, TW-12). #705 (
fix/tailwind-classes) 위에 쌓은 PR이며, #705가 먼저 병합되어야 합니다. 이 PR의 base는main이라 병합 전에는 #705의 커밋도 함께 보입니다.요약
className의 Tailwind class를 Tailwind CSS v4 기준으로 맞춥니다.devup.json의 색상은 Tailwind 테마 값처럼 쓸 수 있습니다(bg-primary,text-text→var(--primary),var(--text)). 같은 이름이면 devup 값이 팔레트보다 먼저입니다.p-4!,!p-4는 모든 선언에!important를 붙입니다.bg-red-500/50,/[71.37%],/[0.5],/(--alpha)는 v4처럼color-mix(in oklab, <색> <알파>, transparent)로 만듭니다.blur-*,brightness-*,contrast-*,grayscale,hue-rotate-*,invert,saturate-*,sepia와backdrop-*짝이 서로 덮어쓰지 않고--tw-blur같은 변수와filter/backdrop-filter의 합성 값으로 합쳐집니다.-webkit-backdrop-filter도 v4처럼 함께 씁니다.bg-linear-to-r,bg-linear-45,bg-conic-*,bg-radial-*(보간/oklch등과 임의 값 포함)와from-*,via-*,to-*(색,%위치, 임의 값)가--tw-gradient-*변수로 합성됩니다. v4에 없는bg-gradient-to-*는 원문 그대로 둡니다.animate-spin/ping/pulse/bounce가 참조하는@keyframes를 한 번만 내보냅니다.transition,transition-*,duration-*,delay-*,ease-*는 v4의 속성 목록과--tw-duration/--tw-ease변수 구성을 따릅니다(duration-250처럼 임의 정수도ms).space-x/y-*,divide-x/y-*,divide-<색>,divide-solid등이 v4와 같은:where(& > :not(:last-child))선택자로 자식에 적용됩니다(-space-x-4,*-reverse포함). 변형 선택자와도 합쳐집니다(hover:space-x-4→:where(&:hover > :not(:last-child))).shadow-*도 v4 구성으로 맞췄습니다:shadow-md는--tw-shadow와 합성box-shadow,shadow-<색>은--tw-shadow-color,shadow-card는 devup shadow 토큰(var(--card)).@property규칙은 이제 클래스가 실제로 쓰는 사용자 정의 속성에 대해서만(그리고 키프레임과 함께) 개별 규칙으로 내보냅니다.동작
확인한 실제 출력(
probe.ts, devup.json에primary/text색과cardshadow가 있음):prose card bg-gradient-to-r drop-shadow-md bg-nothing/50는 코드에 그대로 남습니다.v4 CSS와 다르게 쓰는 부분 (같은 결과)
:root의--color-*가 아니라 값 그대로 씁니다(빌드가 테마 변수를 내보내지 않으므로). devup 색상은 devup이 내보내는var(--이름)입니다.@supports중첩 대신to right in oklab를 바로 씁니다(Baseline 2024 기준).space-*/divide-*의--tw-*-reverse: 0은 규칙 안에 쓰지 않고@property의 초기값으로 둡니다.*-reverseclass가 어느 순서로 와도 맞습니다.shadow-*는--tw-inset-shadow등 ring 쪽 변수에var(--x, 0 0 #0000)대체값을 둡니다.새로 생기는 오류
없음. 이 PR의 모든 변경은 해석 가능한 class의 출력을 바꾸거나, 해석하지 못하는 class를 원문 그대로 두는 것입니다.
남는 한계
drop-shadow-*: v4는 테마 변수를 거쳐 색을 바꾸는 구성이라 정확히 재현하지 못해 원문 그대로 남깁니다(이전의 v3 값은 틀려서 지웠습니다).ring-*는 이전 구현 그대로입니다(--tw-ring-color가 없으면 효과가 없고,shadow-*와 합성되지 않음). TW-14 범위로 보고합니다.bg-red-500/[0.5]처럼 숫자 임의 불투명도는 v4처럼50%로 바꾸지만,inherit/50처럼 v4가 쓸모없는 값을 만드는 경우는 원문 그대로 둡니다.from-(--x)처럼 종류를 알 수 없는 변수 정지점도 원문 그대로 둡니다.Tailwind v4의 CSS @theme/@utility/@custom-variant는 이 PR 범위가 아닙니다(devup.json 테마만 연결).검증
utilities.ts,theme.css)와 문서의 CSS를 기준으로 한 테스트: 팔레트·불투명도·!, 필터 17개 함수와 임의 값, 그라디언트(방향·각도·보간·conic·radial·임의 값·정지점), shadow, transition/duration/delay/ease/animate와 키프레임, space/divide와 변형 선택자. 해석하지 않는 class(잘못된 숫자, 음수, 알 수 없는 값)가 원문으로 남는지도 확인합니다.cargo fmt --all,cargo +1.99 clippy --workspace --all-targets -- -D warnings,cargo test --workspace통과. WASM 재빌드 후bun run build,bun test(5474 pass, 0 fail, 커버리지 100%),bun lint(기존 경고 2개 외 추가 없음).ring-*가 정의되지 않은--tw-ring-color를 읽는 문제(위 남는 한계).