Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applying inner drop shadow on a shape with opacity destaturates the shape #2990

Open
1 task
ajitid opened this issue Mar 2, 2025 · 0 comments
Open
1 task
Labels
bug Something isn't working

Comments

@ajitid
Copy link

ajitid commented Mar 2, 2025

Description

Inner drop shadow when applied to a shape that has opacity doesn't behave as expected. Rather only putting shadow at the edges of the shape, it affects the whole shape. Thus it doesn't appear like a inner shadow as a result.

React Native Skia Version

1.5.0

React Native Version

0.76.7

Using New Architecture

  • Enabled

Steps to Reproduce

Create a rect with a solid fill. Now use color picker to check the color of the rect's center point. Now put a small inner shadow in it, and check color at center point again. You'd find the color to be same

Now create a react with a fill that has some opacity in it. Use color picker to check the color of the rect's center point. Now put a small inner shadow in it, and check color at center point again. You'd find the color to be different.

Expected behavior: The color should remain same at that point.

Snack, Code Example, Screenshot, or Link to Repository

Here's a snack link and here is its preview:

The top rects don't have opacity in it while the bottom two do.

Contrast this to the HTML/CSS version where the center point's color is same even if the shape has some opacity in it:

Other details:
I'm using React Native web ~0.19.13 here.

@ajitid ajitid added the bug Something isn't working label Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant