facebookincubator / infima

A UI framework that provides websites with the minimal CSS and JS needed to get started with building a modern responsive beautiful website
https://infima.dev
MIT License
408 stars 55 forks source link

fix: navbar search input zoom on focus #308

Closed hichemfantar closed 3 months ago

hichemfantar commented 4 months ago

closes #306

This is because inputs should have a minimum font size of 16px, anything lower will cause a zoom in on iOS.

https://stackoverflow.com/a/6394497/11334432

before:

https://github.com/facebookincubator/infima/assets/34947993/1f520e46-d993-423c-b99d-d7d6c89b9418

after:

https://github.com/facebookincubator/infima/assets/34947993/e5124b37-c72e-4bd2-aa54-77f26e81e23c

facebook-github-bot commented 4 months ago

Hi @hichemfantar!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

netlify[bot] commented 4 months ago

Deploy Preview for infima ready!

Built without sensitive environment variables

Name Link
Latest commit 4542b0903dbf3c5069d671d153f7fc7707713440
Latest deploy log https://app.netlify.com/sites/infima/deploys/665b4a62d9a5680008c44bcd
Deploy Preview https://deploy-preview-308--infima.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

hichemfantar commented 4 months ago

There's an issue with the cla signature, waiting for a fix

facebook-github-bot commented 4 months ago

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

hichemfantar commented 3 months ago

@slorber can we merge this please?

slorber commented 3 months ago

Thanks

As far as I understand this does not really impact Docusaurus because most Docusaurus sites are using Algolia which already uses 1rem

Note that sooner or later I'll deprecate Infima and merge a part of its code back into the Docusaurus theme classic as an implementation detail, so I wouldn't recommend relying too much on it for your own site styling: you'd rather create your own custom CSS for that because things we don't use in Docusaurus core are likely to be removed.

slorber commented 3 months ago

cc @praveenn77 it's preferable if your lunr plugin did not depend on Infima classes: https://github.com/praveenn77/docusaurus-lunr-search

If we create a Tailwind-based theme (which we plan to do), your plugin will not work by default because Infima won't be loaded. It is preferable that you provide your own stylesheet

hichemfantar commented 3 months ago

@slorber i agree that the plugin shouldn't rely on infima styles as they are prone to change but for now this a good enough fix (the plugin has 27,693 weekly downloads on npm) Also the tailwind change will most likely warrant a major version bump for docusaurus (v4) and the plugin currently has a peer dep lock to docusaurus<v3 so technically it shouldn't break existing projects if docusaurus gets a v4 release which it should according to semver.

hichemfantar commented 3 months ago

@slorber btw do you plan to publish a new release with this fix in order to fix existing websites?

slorber commented 3 months ago

Alpha 44 is out: https://www.npmjs.com/package/infima?activeTab=versions