okturtles.com
okturtles.com copied to clipboard
Weird scss
A few issues here:
.clearfix { display: inline-block; }
/* start commented backslash hack \*/
* html .clearfix { height: 1%; }
.clearfix { display: block; }
/* close commented backslash hack */
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
-
.clearfixis defined twice for some reason, with different values - Not clear what the "backslash hack" is
- What on earth is
* html .clearfix { height: 1%; }?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The "clearfix hack" is a way to clear floats without adding extra markup, because otherwise some browsers let floats overflow their parent div. The code in question looks like a solution that works on as many browsers as possible (e.g. including IE for Mac).
If we're only supporting IE 8 and up, looks like we can use this:
.group:after {
content: "";
display: table;
clear: both;
}
Source: https://css-tricks.com/snippets/css/clear-fix/