馃憢 Hey, I'd be very keen to add six new classes to Tailwind:
width: max-content;, which would be written in Tailwind as w-content
min-width: max-content;, which would be written in Tailwind as min-w-content
max-width: max-content;, which would be written in Tailwind as max-w-content
height: max-content;, which would be written in Tailwind as h-content
min-height: max-content;, which would be written in Tailwind as min-h-content
max-height: max-content;, which would be written in Tailwind as max-h-content
Very keen to get my hands a bit dirty and add this myself, but curious on people's thoughts as to whether or not the general consensus is for or against these additions.
Hey, if I am not totally lost you can just add this to your configuration, as max-width is already there.
// tailwind.config.js
module.exports = {
theme: {
maxWidth: {
...,
"content": "max-content"
}
}
}
My opinion is that this does not meet the threshold to be widely useful in order to be added to the default configuration.
Yeah, that's fair enough. I've already done something very similar for personal projects, just thought it might be a nice addition to Tailwind is all.
yeah, I need this functionality.
this feature should be added out of the box into vanilla tailwind css.
yeah, I need this functionality.
this feature should be added out of the box into vanilla tailwind css.
Thanks, @imannms. If this gets more traction I'll look into doing this
We don't include this by default because it has no Edge or IE support, but you can add it to your config file if you need it 馃憤馃徎
Closing for now, can revisit in the future if there's a lot of demand for it as a default.
@adamwathan Can we reopen this? It's a useful and standard part of CSS with full support in all browsers except only IE https://developer.mozilla.org/en-US/docs/Web/CSS/width#Browser_compatibility
Yep I actually have it on my to-do list to add max-content and min-content soon 馃憤
Anyone progress been made on this? Ran into this not being included out of the box as well unless I missed it. Implemented it within the config file but still would be nice not having to do as such.
Most helpful comment
Anyone progress been made on this? Ran into this not being included out of the box as well unless I missed it. Implemented it within the config file but still would be nice not having to do as such.