'alignItems' container style breaks the input fields
See original GitHub issueHi!
When you place FloatingLabelInputs inside a View container which has the alignItems
style set to something different than 'stretch' (default)
, these inputs don’t work properly. They are very narrow, placeholders go out of borders and the user input itself isn’t visible.
I’ve tried setting width for the inputs to fix it, but it doesn’t solve the issue - entered text gets cropped and is still not visible.
On the image below, the password field has it’s style set to width: '80%'
and the style of the container View is set to alignItems: 'center'
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
align-items - CSS: Cascading Style Sheets - MDN Web Docs
The flex items' margin boxes are centered within the line on the cross-axis. If the cross-size of an item is larger than the...
Read more >align-items - CSS-Tricks
The align-items property is related to CSS layout. It effects how elements are aligned both in Flexbox and Grid layouts.
Read more >input / button elements not shrinking in a flex container
This means that items cannot shrink below their width on the main axis. Hence, input elements cannot shrink below their default width and...
Read more >CSS align-items property - W3Schools
The align-items property specifies the default alignment for items inside the flexible container. Tip: Use the align-self property of each item to override ......
Read more >Align Items - Tailwind CSS
Utilities for controlling how flex and grid items are positioned along a container's cross axis.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You are right - mistake simple as that 😉
It seems that everything is working properly now. Thanks for the fix
@pawicao, sorry but I think you’re using the margin or padding at the wrong style prop. If you want the margin to affect the area around the input, use the containerStyles prop as the image shows:
If you can confirm this is working as intended, we can close this.