FormidableLabs / react-native-zephyr

TailwindCSS-inspired styling library for React Native.
https://formidable.com/open-source/react-native-zephyr/
MIT License
347 stars 5 forks source link

Better `bg-opacity` support #26

Closed gksander closed 2 years ago

gksander commented 2 years ago

Address #25 by adding bg-opacity support for:

Previously, the bg-opacity support was limited to rgb, #rgb, and #rrggbb.

The logic here will take an existing opacity (if it exists), and scale it by the bg-opacity value. E.g., if the bg color is rgba(100,0,0, 0.6) and bg-opacity:50 is applied, the resulting bg color is rgba(100,0,0, 0.3).

gksander commented 2 years ago

Added support for named colors.