Skip to content

feat(image): add drop shadow and checkerboard for transparent images#1681

Open
mrscobbler wants to merge 1 commit into
box:masterfrom
mrscobbler:feature/image-drop-shadow
Open

feat(image): add drop shadow and checkerboard for transparent images#1681
mrscobbler wants to merge 1 commit into
box:masterfrom
mrscobbler:feature/image-drop-shadow

Conversation

@mrscobbler

@mrscobbler mrscobbler commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds image shadow and transparency indicator styling, fully gated behind the imageDropShadow feature flag
  • JPEG images get a rectangular box-shadow
  • Transparent images (PNG, SVG, GIF) get filter: drop-shadow() (traces visible pixels) + a checkerboard background to indicate transparency
  • Nothing ships until features.imageDropShadow is set to true by the consuming app

Usage

preview.show(fileId, {
  features: { imageDropShadow: true }
});

Test plan

  • Without feature flag — no visual change to any image type
  • With flag enabled, preview a JPEG — rectangular box-shadow
  • With flag enabled, preview a transparent PNG — drop-shadow traces visible pixels + checkerboard behind transparent areas
  • With flag enabled, preview an SVG — drop-shadow + checkerboard
  • With flag enabled, preview a GIF — drop-shadow + checkerboard
  • Zoom in/out — shadow and checkerboard remain correct
  • Rotate image — no visual regression

🤖 Generated with Claude Code

@mrscobbler mrscobbler requested a review from a team as a code owner June 17, 2026 21:56
Gate all image shadow styling behind the imageDropShadow feature flag:
- JPEG: box-shadow for rectangular depth
- PNG/SVG/GIF: drop-shadow (traces alpha) + checkerboard background

Nothing ships until features.imageDropShadow is set to true.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mrscobbler mrscobbler force-pushed the feature/image-drop-shadow branch from ba928b9 to e9ae065 Compare June 24, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant