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

Percentage units (%) support on fontSize style property 🚀 #578

Open
lgxm3z opened this issue Jan 16, 2023 · 1 comment
Open

Percentage units (%) support on fontSize style property 🚀 #578

lgxm3z opened this issue Jan 16, 2023 · 1 comment

Comments

@lgxm3z
Copy link

lgxm3z commented Jan 16, 2023

Introduction

One of the challenges of designing for mobile devices is ensuring that text is legible and visually consistent across different screen sizes and resolutions. One way to improve the flexibility and responsiveness of our designs is by allowing for the use of percentage units on the fontSize style property in React Native.

Allowing percentage units on the fontSize property would make it easier to create designs that look and feel consistent across different screen sizes and resolutions. It would also allow for greater dynamic and adaptive UI elements. This feature will also be align with some properties like width and height that already support percentage units.

Code example

<Text allowFontScaling={false} style={{fontSize: '50%'}}>
  Some Text
</Text>
@lgxm3z lgxm3z changed the title Percentage units support on fontSize style property 🚀 Percentage units (%) support on fontSize style property 🚀 Jan 28, 2023
@mtch99
Copy link

mtch99 commented Mar 5, 2024

What would be the reference for that percentage?
Would it be a base fontSize value, or the screen?

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