I though that perhaps this would be an appropriate name:
clear-after: both;
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.
Yup, the ::after { clear: both; } thing was always a hack. The right solution is to make the container a formatting context; unfortunately, the only way to do that currently is with other hacks (like making it overflow: hidden). display: flow-root is the correct way to force a block element to be a formatting context; please bug browser vendors to implement it.
fantasai and I consider it finished and stable design-wise, but no promises can be made until at least one implementation has been done and gotten reasonable adoption.
For those read the previous version of this comment: the feature request for Edge has originally been posted in the Edge’s bug tracker, but has been closed on the ground that their bug tracker is for bug reports and not feature requests.
Update (2017-01-02): The feature is already implemented in Firefox Nightly and is going to be available in stable Firefox 53 planned to be released on 2017-04-18.
Update (2017-01-27): The feature is available in Chrome 58 (Canary build) planned to be released as a stable version in early March.
caniuse.com now displays vendor support. I originally put in a pull request with just the two mentioned here, and Alexis found future support for Opera as well.
First version shown with support (as of 2017-03-09):
Firefox 53
Chrome(ium) 58
Opera 45
IE/Edge None
Safari None
I look forward to the clearfix hack finally being resolved.
Modified a codepen I found to demonstrate the result once it’s happened.
Fwiw, the feature request for Chromium is now marked as fixed, so the feature will likely be really available in Chrome 58 and Opera 45.
The feature request for Edge currently has 1,174 votes.
WebKit’s progress is unknown.
Update (2017-03-07): Opera 45 (currently available as an Opera Developer prerelease) is based on Chromium 58 and supports display: flow-root as expected.