Repository navigation
Conversation
…selectors The shadow sampler selected elements by class-name substring ([class*='card'], …). Sites with obfuscated / utility class names (Stripe, Vercel) carry their card elevation on plain divs that never matched, so `shadows: []` and the renderer faked a heavy off-brand drop shadow. Now sweep a broad structural set of visible, card-sized boxes and collect their real computed box-shadow; the shadow recurring on the most boxes is the brand's elevation signature. Skips tiny (icon/inline) and full-bleed page wrappers. Verified by live re-capture: Stripe [] -> 5 shadows (incl. the signature rgba(50,50,93,0.12) 0 16px 32px), Vercel [] -> 3. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
2 of 3 tasks
Collaborator
|
Thanks for the contribution! Computed-style shadow capture is now merged in #3686, with credit to you. The refreshed fix also preserves existing button/header samples and adds browser regression coverage. Closing this older PR as superseded. |
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.

Problem
The shadow sampler in
designStyleExtractor.tsselected elements by class-name substring ([class*='card'],button,[class*='panel'], …). Sites with obfuscated / utility class names carry their card elevation on plaindivs that never match those selectors, soshadows: []came back empty — and the showcase renderer then faked a heavy0 10px 34pxMaterial drop shadow, the opposite of e.g. Vercel's near-invisible hairline. (Surfaced by reviewers on Stripe + Vercel.)Fix
Sweep a broad structural set of visible, card-sized boxes and collect their real computed
box-shadow; the shadow that recurs on the most boxes is the brand's elevation signature. Skips tiny (icon/inline) elements and full-bleed page wrappers so a body/section shadow can't win.Verified (live re-capture)
[]→ 5 shadows, incl. the signaturergba(50, 50, 93, 0.12) 0 16px 32px[]→ 3oxlint/oxfmtclean,bun run build✓,vitest run src/capture/54/54Output shape unchanged (
shadows: Array<{value, count}>), backward compatible. Follow-ups (separate):cards: []shares the same class-selector root cause; ElevenLabs glass/aura live on pseudo-elements/canvas.🤖 Generated with Claude Code