0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-29 21:52:22 +01:00

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)
This commit is contained in:
Mark Otto 2016-11-27 17:05:29 -08:00 committed by GitHub
parent 585516db95
commit 869bd23937
2 changed files with 5 additions and 8 deletions

View File

@ -12,13 +12,10 @@ Easily clear `float`s by adding `.clearfix` **to the parent element**. Utilizes
{% highlight scss %}
// Mixin itself
.clearfix() {
&:before,
&:after {
@mixin clearfix() {
&::after {
display: block;
content: "";
display: table;
}
&:after {
clear: both;
}
}

View File

@ -1,7 +1,7 @@
@mixin clearfix() {
&::after {
display: block;
content: "";
display: table;
clear: both;
}
}