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

aspectRatio + undefined width/height #22979

Closed
santiph opened this issue Jan 14, 2019 · 1 comment
Closed

aspectRatio + undefined width/height #22979

santiph opened this issue Jan 14, 2019 · 1 comment
Labels
Bug Platform: Linux Building on Linux. Resolution: Locked This issue was locked by the bot.

Comments

@santiph
Copy link

santiph commented Jan 14, 2019

Environment

React Native Environment Info:
    System:
      OS: Linux 4.15 Ubuntu 18.04.1 LTS (Bionic Beaver)
      CPU: (12) x64 AMD Ryzen 5 2600X Six-Core Processor
      Memory: 15.10 GB / 31.34 GB
      Shell: 2.7.1 - /usr/bin/fish
    Binaries:
      Node: 8.10.0 - /usr/bin/node
      npm: 3.5.2 - /usr/bin/npm
    npmPackages:
      react: 16.6.3 => 16.6.3 
      react-native: 0.57.8 => 0.57.8 
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7

Description

aspectRatio and height: 100% seem to work only when width is set to undefined, but with aspectRatio and width set, then height is not required at all. (See Demo)
Why is that?

Reproducible Demo

Working fine:

aspectRatio: 1,
width: '100%',
aspectRatio: 1,
height: '100%',
width: undefined,
@rickhanlonii
Copy link
Member

Hey @santiph thanks for filing

If I understand correctly, this is the way aspectRatio is designed to work since aspectRatio controls the size of the unset dimension. If I'm misunderstanding, can you provide a snack or repro that demonstrates?

@facebook facebook locked as resolved and limited conversation to collaborators Mar 19, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: Linux Building on Linux. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants