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

rgb color without commas doesn't work (newer syntax) #33536

Closed
johhansantana opened this issue Mar 31, 2022 · 6 comments
Closed

rgb color without commas doesn't work (newer syntax) #33536

johhansantana opened this issue Mar 31, 2022 · 6 comments
Labels
Needs: Triage 🔍 Resolution: Locked This issue was locked by the bot.

Comments

@johhansantana
Copy link

johhansantana commented Mar 31, 2022

Description

Using something like rgb(255 0 0) doesn't seem to apply the changes but using rgb(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)

@danilobuerger
Copy link
Contributor

Why should it work without commas?

@johhansantana
Copy link
Author

johhansantana commented Apr 1, 2022

@johhansantana johhansantana changed the title rgb color without commas doesn't work rgb color without commas doesn't work (new syntax) Apr 1, 2022
@johhansantana johhansantana changed the title rgb color without commas doesn't work (new syntax) rgb color without commas doesn't work (newer syntax) Apr 1, 2022
@danilobuerger
Copy link
Contributor

I don't think there is a promise that react native implements everything from the css spec.

Color properties usually match how CSS works on the web.

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.

@johhansantana
Copy link
Author

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)

@danilobuerger
Copy link
Contributor

You could bring it up as a feature request instead.

@johhansantana
Copy link
Author

You could bring it up as a feature request instead.

ok. thank you 🙏

@facebook facebook locked as resolved and limited conversation to collaborators Apr 1, 2023
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Apr 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs: Triage 🔍 Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants