h5bp/html5-boilerplate — Issue #1004: The `clearfix` class has unwanted side-effects in Safari 5.1.2
Author: davidmurdoch
Created: 2012-02-29 19:17:35+00:00
State: open

Adding the `clearfix` class to an element who's children's display property is set to `table-cell`with a `width` of `1%` (give or take) causes unwanted side-effects.

The bug appears in Safari 5.1.2 on Windows.
The clearfix class has no side-effects in this case in Chrome 17-19, Firefox 10.0.2, IE8-9 (tested IE8 mode in IE9, display:table-cell isn't supported in IE<8), and Opera 11.61 (all browsers tested on Windows).

http://jsfiddle.net/musicisair/evL3t/

In my case I had forgotten about the `clearfix` class and I didn't need it. I don't know if there are any applicable use cases for adding `clearfix` to an element in this situation; I just thought I'd bring it up just in case.