Skip to content

[Feature request] Add support for viewport units #184

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

Closed
hyoretsu opened this issue Mar 4, 2023 · 3 comments
Closed

[Feature request] Add support for viewport units #184

hyoretsu opened this issue Mar 4, 2023 · 3 comments

Comments

@hyoretsu
Copy link

hyoretsu commented Mar 4, 2023

This was already implemented in a 3rd party lib called rn-css, and it's easily doable on our end. But if we do it manually, it's a hassle to import and call vw/vh variables every single time.

@jacobp100
Copy link
Contributor

jacobp100 commented Mar 4, 2023

Do you just want them written out to the returned style object?

@hyoretsu
Copy link
Author

hyoretsu commented Mar 4, 2023

Rather, I want them converted to measures in RN. e.g. if I use 97 * vw it can be translated to

import { Dimensions } from 'react-native';

97 * Dimensions.get('window').width / 100;

@jacobp100
Copy link
Contributor

You’ll need to put a runtime in front of this library to do that

See what Cssta does

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants