Skip to content

Commit

Permalink
(less) Better clearing on .dl-horizontal for empty dd elements
Browse files Browse the repository at this point in the history
Instead of clearing the entire `.dl-horizontal`, we've moved the
clearfix mixin to the `dd` level to solve two problems in one: empty
`dd`s mid-list, and empty `dd` as the last child.

Addresses a few old issues, including twbs#2824, twbs#3819, twbs#3821, twbs#4062,
twbs#6707, and twbs#7180.

Sorry that took so long :D.
  • Loading branch information
mdo committed Jun 17, 2013
1 parent 09c7e48 commit 4214844
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion type.less
Expand Up @@ -149,7 +149,6 @@ dd {
}
// Horizontal layout (like forms)
.dl-horizontal {
.clearfix(); // Ensure dl clears floats if empty dd elements present
dt {
float: left;
width: (@component-offset-horizontal - 20);
Expand All @@ -158,6 +157,7 @@ dd {
.text-overflow();
}
dd {
.clearfix(); // Clear the floated `dt` if an empty `dd` is present
margin-left: @component-offset-horizontal;
}
}
Expand Down

0 comments on commit 4214844

Please sign in to comment.