I’d like to propose a new property to cause an element to contain all of its floated children—what is commonly referred to as a “clearfix”.
Given that https://developer.mozilla.org/en-US/docs/Web/CSS/clear and many other sources recommend accomplishing this with:
I though that perhaps this would be an appropriate name:
One advantage of this over the current recommended approach is that it preserves
::after to be usable by
selector, say to render a
position: absolute child, which wouldn’t simultaneously be able to accomplish the float containment.
Options could simply be:
clear-after: none; /* Default */
Forgive me if there is active discussion around this elsewhere but I couldn’t find anything after a few searches.