0

inline-size=fit-content and auto are same thing?

I found no difference between two inline size property (fit-content and auto). Can anyone explain me about this. https://code.sololearn.com/W7389X7TT4HU/?ref=app

27th Jan 2021, 2:19 AM
NUR ISLAM
NUR ISLAM - avatar
2 Answers
+ 1
if the height is set to auto it will automatically set its height to allow its content to be display correctly. And fit-content is mostly used for the box content. If you set the fit-content it will use the full available space but never more than max-content. Both are the same in such a manner.
27th Jan 2021, 8:33 AM
Shaili Shah
Shaili Shah - avatar
+ 2
I think fit-content would be for the specific parameters you set for specific elements and auto would be the machine sizing based on the parent element or the general default settings of the browser.
27th Jan 2021, 7:42 AM
Shay
Shay - avatar