-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
rgb color without commas doesn't work (newer syntax) #33536
Comments
Why should it work without commas? |
it’s an acceptable syntax https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb taken from |
I don't think there is a promise that react native implements everything from the css spec.
Key word being usually. See https://reactnative.dev/docs/colors Also it lists the supported syntax of color values here: https://reactnative.dev/docs/colors#red-green-blue-rgb which does not include space separated values. |
Ok. I just stumble upon this since tailwindcss newer version now exports their css using the space separated values, thus not working with react native. vadimdemedes/tailwind-rn#162 (comment) |
You could bring it up as a feature request instead. |
ok. thank you 🙏 |
Description
Using something like
rgb(255 0 0)
doesn't seem to apply the changes but usingrgb(255, 0, 0)
works. (not the commas)Version
0.66
Output of
npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 12.2.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 111.78 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.17.5 - ~/.nvm/versions/node/v14.17.5/bin/node
Yarn: 1.22.11 - ~/.nvm/versions/node/v14.17.5/bin/yarn
npm: 6.14.14 - ~/.nvm/versions/node/v14.17.5/bin/npm
Watchman: 2022.01.03.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK:
API Levels: 23, 28, 29, 30
Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2, 30.0.3, 31.0.0, 31.0.0
System Images: android-30 | Google APIs Intel x86 Atom, android-31 | Google APIs Intel x86 Atom_64, android-R | Google Play Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.7042882
Xcode: 13.3/13E113 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_252 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.66.3 => 0.66.3
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Simply try changing color of an element using
rgb(255 0 0)
. Try different combinations since it will leave the last working color for some reason.Snack, code example, screenshot, or link to a repository
https://snack.expo.dev/@jsantana/0e4070 (change color on line 37)
https://codesandbox.io/s/musing-easley-34qlgi?file=/src/App.js (also doesn't seem to work in react-native-web)
The text was updated successfully, but these errors were encountered: