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

CSS3 3D properties implementation #17616

Closed
ghost opened this issue Jan 15, 2018 · 4 comments
Closed

CSS3 3D properties implementation #17616

ghost opened this issue Jan 15, 2018 · 4 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@ghost
Copy link

ghost commented Jan 15, 2018

Is this a bug report?

This is a crucial feature request

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: macOS Sierra 10.12.6
Node: 8.4.0
Yarn: 0.27.5
npm: 5.4.0
Watchman: 4.7.0
Xcode: Xcode 8.3.3 Build version 8E3004b
Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed)
react-native: 0.48.1 => 0.48.1
react: 16.0.0-alpha.12 => 16.0.0-alpha.12

Target Platform: iOS (10.3)

Steps to Reproduce

Try to use CSS3's 3D properties on React Native's StyleSheet. And it will not work.
https://www.w3schools.com/css/css3_3dtransforms.asp

  1. Start a react native project.
  2. Use CSS3 Properties on StyleSheet
  3. It will not work....

Expected Behavior

React Native will fully support CSS3 3D properties using its StyleSheet.

Actual Behavior

React Native's stylesheet doesn't work with CSS3 3D properties...

Reproducible Demo

All React Native apps are demos of this problem. It should implement CSS3 3D properties ASAP to help creative make what they want.

@adrianfalleiro
Copy link

@jamesharvey2 What properties specifically are you having issues with?

React Native has support for transform and perspective and backfaceVisibility.

You apply a transform in a StyleSheet in the following way:

const styles = StyleSheet.create({
  component: {
    transform: [
      {translateX: 50},
      {rotateY: '60deg'}
    ]
  }
});

More information can be found in the documentation: https://facebook.github.io/react-native/docs/transforms.html

@lwinkyawmyat
Copy link
Contributor

@facebook-github-bot answered

@facebook-github-bot
Copy link
Contributor

Closing this issue as @lwinkyawmyat says the question asked has been answered.

@facebook-github-bot facebook-github-bot added the Ran Commands One of our bots successfully processed a command. label Jan 18, 2018
@wcandillon
Copy link
Contributor

@adrianfalleiro: on Android there is a default perspective set. I struggling to find it's value. I have a 3d rotation that depends on the perspective value. Works great on iOS but fails on Android because, I don't know which value I should assume for the perspective: https://snack.expo.io/@wcandillon/instagram-stories

I looked at the source code and tried some values like 1280, 1280density, or 1280density*5 without success.
I would love to know which transform to apply in order to "revert" the effect of the default perspective on Android.

@facebook facebook locked as resolved and limited conversation to collaborators Jan 18, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants