does input box has a minimum width set by default?

even though i have not given my input box a width or min-width.. it still never goes below 202px.. is it becuz input box has a min width set by default?
12 Replies
Mannix
Mannix3mo ago
yes it does
reeee
reeee3mo ago
it has a min-width value? i googled it but didnt find any answer
Mannix
Mannix3mo ago
it has min-width set on it by the browser iirc don't think you can see it in dev tools
reeee
reeee3mo ago
btw why is it that when i gave the input box the min width of value 0 then nothing happened ( its min-width was still 200px something )
Mannix
Mannix3mo ago
An Interactive Guide to Flexbox
When we truly learn the secrets of the Flexbox layout mode, we can build absolutely incredible things. Fluid layouts that stretch and shrink without arbitrary breakpoints. In this action-packed interactive tutorial, we'll pop the hood on the Flexbox algorithm and learn how to do remarkable things with it. ✨
reeee
reeee3mo ago
but when i gave the input box container the min-width of 0 then it started going below 200px thats crazy i had no idea about this
snxxwyy
snxxwyy3mo ago
it doesn't have a min-width. It has a width and inline-size (the same as width however it makes it function accordingly with different writing modes). You can see them in the dev tools here. That is why it isn't shrinking, it has has a fixed width.
snxxwyy
snxxwyy3mo ago
No description
No description
reeee
reeee3mo ago
but why it becomes shrinkable only when i set the min-width property to 0 its not happening with other properties
snxxwyy
snxxwyy3mo ago
are you using flexbox?
reeee
reeee3mo ago
yes
snxxwyy
snxxwyy3mo ago
the default value of every flexbox item is min-width: 100%; and max-width: 100%;, meaning the smallest they can be and biggest they can be is their natural size. When you set it to 0, it's allowing it to shrink below it's size.
Want results from more Discord servers?
Add your server