Skip to content

Conversation

@Simek
Copy link
Contributor

@Simek Simek commented Dec 26, 2025

Why

With the release of React Native 0.76 support for part of CSS filters has been added:

How

Implement majority of available filters (brightness, contrast, saturate, grayscale, invert, sepia and hue-rotate) using the array of object notation.

Filters which left to do:

  • blur - should be the least complex one, besides supporting custom predefined values on Tailwind side
  • dropShadow - seems like an alternate approach to adding shadows to View, it seems to be based on boxShadow aded within the same release, and shares some some properties with it like offset*
  • opacity - not sure what we should do about this one, since even Tailwind uses opacity directly, not via filters, and I'm not sure if the end-effect differs in any way than using opacity style prop directly

Refs

}

export function isArbitraryValue(value: string): boolean {
return value.startsWith(`[`) && value.endsWith(`]`);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we not already have a function like this? or are there some obvious other places we should use it instead for clarity?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! I have extracted the helper from transforms resolver to avoid duplicating the code. After your comment I have found few more places where it can be used, replaced inline checks and made sure that all tests are still passing. Let me know if this approach make sense!

Copy link
Owner

@jaredh159 jaredh159 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems good to me, just wonder about that helper function, see comment.

@jaredh159 jaredh159 merged commit 0b539e1 into jaredh159:master Dec 30, 2025
1 check passed
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.

2 participants