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:
parent
585516db95
commit
869bd23937
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
@mixin clearfix() {
|
||||
&::after {
|
||||
display: block;
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user