diff --git a/docs/utilities/clearfix.md b/docs/utilities/clearfix.md index a023a79aaf50..49410df09883 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 d0ae125f3d46..b72cf27128aa 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; } }