2
I recently came across these two values for the width
of an element, however I did not understand how to use them and what they serve...
That’s what the Mozilla documentation says, but I don’t get it:
max-content
The preferred intrinsic width. (width: min-content)
------------------------------------------------
min-content
The preferred minimum intrinsic width. (width: max-content)
-------------------------------------------------------------
Source: https://developer.mozilla.org/en-US/docs/Web/CSS/max-width
What would these values actually be, and how the elements behave with them?
These values are already accepted by all browsers?
If possible I would like one or two didactic examples :)
Grandson is a little confused the text... Look at this The smaller size that a box can lead that does not lead to overflow that could be avoided by choosing a larger size. It didn’t help me much... And the examples you linked are about max-width and min-width, not about
width: min-content
andwidth: max-content
– hugocsl
Grandson in this case I suggest you edit your answer remove the examples that are wrong in it, review the translated text I believe because they do not make sense is difficult to understand them. And put the new examples right as code in the reply, use the icon next to the image to include the code in your reply. This makes it clearer and the answer preserves the content if the external link stops working
– hugocsl
The text did not help much, if you can explain the functioning of the new examples there would be something interesting. Because the doubt is to understand how these attributes work when applied to the element. Only a code as an example without any explanation does not help much
– hugocsl