The End of the Clearfix hack?

Avatar of Sarah Drasner
Sarah Drasner on

Rachel Andrew with a clear (get it?!) explanation of display: flow-root;, including demos comparing old and new techniques. Apparently the name is still a little bit still up in the air.

The whole point of it is getting rid of clearfix (although it is a bit different), or using a different/unintended property for float clearning. Every time this is brought up, there is always a well actually about how overflow: hidden; does the same (or any other property that creates a new block formatting context). Like we mentioned before, overflow has consquences totally unrelated to float clearning, like hiding shadows. All of the other methods have unrelated consequences.

Direct Link →