Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird scss #33

Open
taoeffect opened this issue Oct 13, 2016 · 1 comment
Open

Weird scss #33

taoeffect opened this issue Oct 13, 2016 · 1 comment
Assignees
Labels

Comments

@taoeffect
Copy link
Member

taoeffect commented Oct 13, 2016

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;
}
  • .clearfix is 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.

@dotmacro
Copy link
Member

dotmacro commented Aug 30, 2018

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants