Sass / SCSS Mixin pour Clearfix - meilleure approche?

Je veux enlever l' clearfix classe à partir de mon code HTML et comprennent un clearfix mixin dans mon SCSS (application Rails 3.1). Quelle est la meilleure approche?

Je pense juste prendre le HTML 5 Standard clearfix et le transformer en un mixin, @y compris dans le CSS pour les éléments qui doivent clearfixing.

Copié à partir de HTML5 Boilerplate:

/* The Magnificent Clearfix: Updated to prevent margin-collapsing on child elements. http://j.mp/bestclearfix */
.clearfix:before, .clearfix:after { content: "
/* The Magnificent Clearfix: Updated to prevent margin-collapsing on child elements. http://j.mp/bestclearfix */
.clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; }
.clearfix:after { clear: both; }
/* Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin padding-bottom-of-page */
.clearfix { zoom: 1; }
20"
; display: block; height: 0; overflow: hidden; } .clearfix:after { clear: both; } /* Fix clearfix: blueprintcss.lighthouseapp.com/projects/15318/tickets/5-extra-margin padding-bottom-of-page */ .clearfix { zoom: 1; }

Est-il un inconvénient à cela? Est-il un meilleur moyen? Puis-je retirer en toute sécurité clearfix de mon balisage HTML de cette façon?

source d'informationauteur Richard Jordan