From: Mark Otto Date: Mon, 28 Nov 2016 01:05:29 +0000 (-0800) Subject: Update clearfix mixin (#21224) X-Git-Tag: v4.0.0-alpha.6~381^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=869bd23937448fdcbae37c1062d373ef3ae7722a;p=thirdparty%2Fbootstrap.git Update clearfix mixin (#21224) * Update clearfix to use block instead of table display (also reorder properties for linting) * update docs snippet for clearfix mixin—was apparently still using Less syntax and had old clearfix hack (even before the block change in this PR) --- diff --git a/docs/utilities/clearfix.md b/docs/utilities/clearfix.md index a023a79aaf..49410df098 100644 --- a/docs/utilities/clearfix.md +++ b/docs/utilities/clearfix.md @@ -12,13 +12,10 @@ Easily clear `float`s by adding `.clearfix` **to the parent element**. Utilizes {% highlight scss %} // Mixin itself -.clearfix() { - &:before, - &:after { - content: " "; - display: table; - } - &:after { +@mixin clearfix() { + &::after { + display: block; + content: ""; clear: both; } } diff --git a/scss/mixins/_clearfix.scss b/scss/mixins/_clearfix.scss index d0ae125f3d..b72cf27128 100644 --- a/scss/mixins/_clearfix.scss +++ b/scss/mixins/_clearfix.scss @@ -1,7 +1,7 @@ @mixin clearfix() { &::after { + display: block; content: ""; - display: table; clear: both; } }