git repos / blockattack-game

blame: source/misc/embedded_libs/fmt-8.1.1/doc/bootstrap/mixins/clearfix.less

normal view · raw

f8deb5b9 Poul Sander 2022-01-15 13:55 1
// Clearfix
f8deb5b9 Poul Sander 2022-01-15 13:55 2
//
f8deb5b9 Poul Sander 2022-01-15 13:55 3
// For modern browsers
f8deb5b9 Poul Sander 2022-01-15 13:55 4
// 1. The space content is one way to avoid an Opera bug when the
f8deb5b9 Poul Sander 2022-01-15 13:55 5
//    contenteditable attribute is included anywhere else in the document.
f8deb5b9 Poul Sander 2022-01-15 13:55 6
//    Otherwise it causes space to appear at the top and bottom of elements
f8deb5b9 Poul Sander 2022-01-15 13:55 7
//    that are clearfixed.
f8deb5b9 Poul Sander 2022-01-15 13:55 8
// 2. The use of `table` rather than `block` is only necessary if using
f8deb5b9 Poul Sander 2022-01-15 13:55 9
//    `:before` to contain the top-margins of child elements.
f8deb5b9 Poul Sander 2022-01-15 13:55 10
//
f8deb5b9 Poul Sander 2022-01-15 13:55 11
// Source: http://nicolasgallagher.com/micro-clearfix-hack/
f8deb5b9 Poul Sander 2022-01-15 13:55 12
f8deb5b9 Poul Sander 2022-01-15 13:55 13
.clearfix() {
f8deb5b9 Poul Sander 2022-01-15 13:55 14
  &:before,
f8deb5b9 Poul Sander 2022-01-15 13:55 15
  &:after {
f8deb5b9 Poul Sander 2022-01-15 13:55 16
    content: " "; // 1
f8deb5b9 Poul Sander 2022-01-15 13:55 17
    display: table; // 2
f8deb5b9 Poul Sander 2022-01-15 13:55 18
  }
f8deb5b9 Poul Sander 2022-01-15 13:55 19
  &:after {
f8deb5b9 Poul Sander 2022-01-15 13:55 20
    clear: both;
f8deb5b9 Poul Sander 2022-01-15 13:55 21
  }
f8deb5b9 Poul Sander 2022-01-15 13:55 22
}
1970-01-01 00:00 23