mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-30 22:52:24 +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:
parent
585516db95
commit
869bd23937
@ -12,13 +12,10 @@ Easily clear `float`s by adding `.clearfix` **to the parent element**. Utilizes
|
|||||||
|
|
||||||
{% highlight scss %}
|
{% highlight scss %}
|
||||||
// Mixin itself
|
// Mixin itself
|
||||||
.clearfix() {
|
@mixin clearfix() {
|
||||||
&:before,
|
&::after {
|
||||||
&:after {
|
display: block;
|
||||||
content: " ";
|
content: "";
|
||||||
display: table;
|
|
||||||
}
|
|
||||||
&:after {
|
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
@mixin clearfix() {
|
@mixin clearfix() {
|
||||||
&::after {
|
&::after {
|
||||||
|
display: block;
|
||||||
content: "";
|
content: "";
|
||||||
display: table;
|
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user