Mercurial > minori
annotate dep/fmt/doc/bootstrap/mixins/clearfix.less @ 343:1faa72660932
*: transfer back to cmake from autotools
autotools just made lots of things more complicated than
they should have and many things broke (i.e. translations)
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Thu, 20 Jun 2024 05:56:06 -0400 |
parents | |
children |
rev | line source |
---|---|
343
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
1 // Clearfix |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
2 // |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
3 // For modern browsers |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
4 // 1. The space content is one way to avoid an Opera bug when the |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
5 // contenteditable attribute is included anywhere else in the document. |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
6 // Otherwise it causes space to appear at the top and bottom of elements |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
7 // that are clearfixed. |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
8 // 2. The use of `table` rather than `block` is only necessary if using |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
9 // `:before` to contain the top-margins of child elements. |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
10 // |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
11 // Source: http://nicolasgallagher.com/micro-clearfix-hack/ |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
12 |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
13 .clearfix() { |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
14 &:before, |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
15 &:after { |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
16 content: " "; // 1 |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
17 display: table; // 2 |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
18 } |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
19 &:after { |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
20 clear: both; |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
21 } |
1faa72660932
*: transfer back to cmake from autotools
Paper <paper@paper.us.eu.org>
parents:
diff
changeset
|
22 } |