If you want to apply the same effect to any div, for example, you want the column to not expand but to wrap content, I found what works:<br/>
Just remove "col" to the div, the browser will still respect the div as a container, unlike when you apply "col" to the div, "col" comes with its own bootstrap specification e.g. padding margins, etc.
This can work in a scenario when you want a div to stick to the bottom like self-align-baseline, use d-flex and align-items-end. This will align the div itself the base of the parent column. More to read on the link: https://getbootstrap.com/docs/4.0/utilities/flex/