A good old hack to clean micro clearfix is based on the use of an empty table element to prevent collapse and clean floats. It mentions that this behavior creates anonymous table elements, since each HTML table needs those that exist by design, so as far as I know, the repaint loop has 6 new empty elements for each clearfixed element to process (table + anon row + anon cell * 2), Do they have any performance flaws during the reflow / repaint cycle? How would you test this?
.cf:before, .cf:after { content: " "; display: table; } .cf:after { clear: both; }
source share