Conversation
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.
A Figma TEXT node with a drop shadow currently emits
2px 3px 4px 0px rgba(0, 0, 0, 0.5)astextShadow. Browsers reject the fourth length and computetext-shadow: none, so even an ordinary text drop shadow disappears when the returned CSS is used.Text shadows now use the supported three-length form,
2px 3px 4px rgba(0, 0, 0, 0.5). Inner-shadow entries are omitted for TEXT nodes becauseinsetinvalidates the entire list, including otherwise valid drop shadows. Non-TEXT box shadows retain their spread and inset values; blur output is unchanged.CSS text-shadow cannot represent Figma spread or inner shadows; this fix does not attempt to emulate either. The grammar is defined in CSS Text Decoration §4.
Validation:
c083d65c7e002923e7cb98f4e3bdafb105e90f6d: 5 failures before, all 9 effects tests pass after. Covers absent/zero/nonzero spread, mixed and inner-only shadows, hidden effects, multiple shadows, blur preservation, and box-shadow compatibility.pnpm test: 256 passed, 1 skipped. The skipped test is the repository's opt-in live Figma integration test; no Figma account or design file was used.pnpm type-check,pnpm lint,pnpm build,pnpm exec prettier --check "src/**/*.ts", andnode scripts/scan-hidden-chars.mjspass (Node 26.0.0, pnpm 10.10.0).CSS.supports("text-shadow", before)is false and the computed value isnone; the actual transformed output after this fix is supported and renders a shadow. The non-TEXT computed box shadow is identical before and after.Only the effects transformer and its tests change. No dependencies or generated files change.