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

feat(TextInput/TextArea): prevent zoom on iOS #1238

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ogonkov
Copy link
Contributor

@ogonkov ogonkov commented Jan 9, 2024

No description provided.

@gravity-ui-bot
Copy link
Contributor

Playwright Test Component is ready.

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@@ -1 +1,4 @@
$border-width: 1px;
// Safari on iOS zoom page if input font-size is smaller than 16px
// https://css-tricks.com/16px-or-larger-text-prevents-ios-form-zoom/
$mobile-safari-font-size: 16px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest u to rename this to $mobile-font-size case of it uses not only for safari styles

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be $mobile-min-font-size then?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we do not have a max size or other size at all

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we do have minimal size, it's not just any mobile font size, it is a minimal possible size for Safari

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. It's not a public api

@@ -9,6 +10,10 @@ $block: '.#{variables.$ns-new}text-area';
width: 100%;
position: relative;

&_mobile {
font-size: control-variables.$mobile-safari-font-size;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it's a good idea to hardcode 16px for all the sizes in mobile devices

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's really annoying bug. Why not?

Copy link
Contributor

@amje amje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting 16px to all sizes is a bad workaround

@ogonkov
Copy link
Contributor Author

ogonkov commented Jan 15, 2024

Setting 16px to all sizes is a bad workaround

Do you know better?

@amje
Copy link
Contributor

amje commented Jan 15, 2024

Setting 16px to all sizes is a bad workaround

Do you know better?

Revise font sizes in all components for l/xl size to be at least 16px. But it's cannot be done right away, we need some time to think about it

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

Successfully merging this pull request may close these issues.

4 participants