File: clearfix.less

package info (click to toggle)
castle-game-engine 7.0~alpha.3%2Bdfsg1-2~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 977,324 kB
  • sloc: pascal: 911,523; javascript: 28,186; cpp: 14,157; xml: 9,939; ansic: 9,229; java: 3,653; objc: 2,737; sh: 1,282; makefile: 657; php: 65; lisp: 21; ruby: 8
file content (22 lines) | stat: -rw-r--r-- 605 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Clearfix
//
// For modern browsers
// 1. The space content is one way to avoid an Opera bug when the
//    contenteditable attribute is included anywhere else in the document.
//    Otherwise it causes space to appear at the top and bottom of elements
//    that are clearfixed.
// 2. The use of `table` rather than `block` is only necessary if using
//    `:before` to contain the top-margins of child elements.
//
// Source: http://nicolasgallagher.com/micro-clearfix-hack/

.clearfix() {
  &:before,
  &:after {
    display: table; // 2
    content: " "; // 1
  }
  &:after {
    clear: both;
  }
}