Skip to content

Commit 2d5364d

Browse files
authored
[Image] | (UX) | Stop weird shadow on zoomed view in Classroom (#3260)
## Summary: When you zoom into an image in Khan Academy classroom, it has a weird shadowy outline around the modal. This can be easily fixed by using `margin` instead of `padding`. Issue: https://khanacademy.atlassian.net/browse/LEMS-3897 ## Test plan: Storybook - Go to `/perseus/?path=/story/widgets-image-widget-demo--image` - Make sure nothing looks wrong in the Classic theme - Go to `/perseus/?path=/story/widgets-image-widget-demo--image&globals=theme:thunderblocks` - Make sure the weird shadow is gone in the Classroom theme ### Before <img width="707" height="489" alt="Screenshot 2026-02-17 at 3 53 48 PM" src="https://github.com/user-attachments/assets/c390bbe5-4e07-43c4-8049-1a18131979da" /> ### After <img width="693" height="418" alt="Screenshot 2026-02-17 at 3 53 53 PM" src="https://github.com/user-attachments/assets/9e154927-91da-4e27-896a-941eab0e8985" /> Author: nishasy Reviewers: catandthemachines, mark-fitzgerald, ivyolamit Required Reviewers: Approved By: catandthemachines Checks: ⏭️ 1 check has been skipped, ✅ 10 checks were successful Pull Request URL: #3260
1 parent 8fbeee1 commit 2d5364d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.changeset/little-worms-crash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@khanacademy/perseus": patch
3+
---
4+
5+
[Image] | (UX) | Stop weird shadow on zoomed view in Classroom

packages/perseus/src/components/zoomed-image-view.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ const wbStyles = StyleSheet.create({
9292
dialog: {
9393
width: "auto",
9494
height: "auto",
95-
// Add padding so that the image doesn't touch the edges
95+
// Add margin so that the image doesn't touch the edges
9696
// of the screen on desktop.
97-
padding: sizing.size_320,
97+
margin: sizing.size_320,
9898

9999
// Allow the image to touch the edges of the screen on mobile.
100100
"@media (max-width: 767px)": {
101-
padding: 0,
101+
margin: 0,
102102
},
103103
},
104104
});

0 commit comments

Comments
 (0)