Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
840e47ea
Commit
840e47ea
authored
12 years ago
by
Mark Otto
Browse files
Options
Download
Email Patches
Plain Diff
Update clearfix mixin and class per @necolas's feedback
parent
ac20a082
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/assets/css/bootstrap.css
+18
-33
docs/assets/css/bootstrap.css
less/mixins.less
+14
-16
less/mixins.less
less/utilities.less
+2
-2
less/utilities.less
with
34 additions
and
51 deletions
+34
-51
docs/assets/css/bootstrap.css
+
18
-
33
View file @
840e47ea
...
...
@@ -232,8 +232,7 @@ a:hover {
.container
:before
,
.container
:after
{
display
:
table
;
line-height
:
0
;
content
:
""
;
content
:
" "
;
}
.container
:after
{
...
...
@@ -248,8 +247,7 @@ a:hover {
.row
:before
,
.row
:after
{
display
:
table
;
line-height
:
0
;
content
:
""
;
content
:
" "
;
}
.row
:after
{
...
...
@@ -562,8 +560,7 @@ dd {
.dl-horizontal
:before
,
.dl-horizontal
:after
{
display
:
table
;
line-height
:
0
;
content
:
""
;
content
:
" "
;
}
.dl-horizontal
:after
{
...
...
@@ -1109,8 +1106,7 @@ textarea[class*="span"],
.controls-row
:before
,
.controls-row
:after
{
display
:
table
;
line-height
:
0
;
content
:
""
;
content
:
" "
;
}
.controls-row
:after
{
...
...
@@ -1317,8 +1313,7 @@ select:focus:invalid:focus {
.form-actions
:before
,
.form-actions
:after
{
display
:
table
;
line-height
:
0
;
content
:
""
;
content
:
" "
;
}
.form-actions
:after
{
...
...
@@ -1609,8 +1604,7 @@ legend + .control-group {
.form-horizontal
.control-group
:before
,
.form-horizontal
.control-group
:after
{
display
:
table
;
line-height
:
0
;
content
:
""
;
content
:
" "
;
}
.form-horizontal
.control-group
:after
{
...
...
@@ -3376,8 +3370,7 @@ input[type="button"].btn-block {
.nav
:before
,
.nav
:after
{
display
:
table
;
line-height
:
0
;
content
:
""
;
content
:
" "
;
}
.nav
:after
{
...
...
@@ -3586,8 +3579,7 @@ input[type="button"].btn-block {
.tabbable
:before
,
.tabbable
:after
{
display
:
table
;
line-height
:
0
;
content
:
""
;
content
:
" "
;
}
.tabbable
:after
{
...
...
@@ -3639,8 +3631,7 @@ input[type="button"].btn-block {
.navbar
:before
,
.navbar
:after
{
display
:
table
;
line-height
:
0
;
content
:
""
;
content
:
" "
;
}
.navbar
:after
{
...
...
@@ -3710,8 +3701,7 @@ input[type="button"].btn-block {
.navbar-form
:before
,
.navbar-form
:after
{
display
:
table
;
line-height
:
0
;
content
:
""
;
content
:
" "
;
}
.navbar-form
:after
{
...
...
@@ -4292,8 +4282,7 @@ input[type="button"].btn-block {
.pager
:before
,
.pager
:after
{
display
:
table
;
line-height
:
0
;
content
:
""
;
content
:
" "
;
}
.pager
:after
{
...
...
@@ -4426,8 +4415,7 @@ input[type="button"].btn-block {
.modal-footer
:before
,
.modal-footer
:after
{
display
:
table
;
line-height
:
0
;
content
:
""
;
content
:
" "
;
}
.modal-footer
:after
{
...
...
@@ -5232,14 +5220,13 @@ a.badge:hover {
line-height
:
30px
;
}
.clear
:before
,
.clear
:after
{
.clear
fix
:before
,
.clear
fix
:after
{
display
:
table
;
line-height
:
0
;
content
:
""
;
content
:
" "
;
}
.clear
:after
{
.clear
fix
:after
{
clear
:
both
;
}
...
...
@@ -5342,8 +5329,7 @@ a.badge:hover {
.row
:before
,
.row
:after
{
display
:
table
;
line-height
:
0
;
content
:
""
;
content
:
" "
;
}
.row
:after
{
clear
:
both
;
...
...
@@ -5439,8 +5425,7 @@ a.badge:hover {
.row
:before
,
.row
:after
{
display
:
table
;
line-height
:
0
;
content
:
""
;
content
:
" "
;
}
.row
:after
{
clear
:
both
;
...
...
This diff is collapsed.
Click to expand it.
less/mixins.less
+
14
-
16
View file @
840e47ea
...
...
@@ -3,20 +3,24 @@
// --------------------------------------------------
// U
TILITY MIXINS
// -------------------------
-------------------------
// U
tilities
// -------------------------
// Clearfix
// --------
// For clearing floats like a boss h5bp.com/q
.clearfix() {
// Source: http://nicolasgallagher.com/micro-clearfix-hack/
//
// 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.
.clear_float() {
&:before,
&:after {
display: table;
content: "";
// Fixes Opera/contenteditable bug:
// http://nicolasgallagher.com/micro-clearfix-hack/#comment-36952
line-height: 0;
content: " "; /* 1 */
display: table; /* 2 */
}
&:after {
clear: both;
...
...
@@ -24,7 +28,6 @@
}
// Webkit-style focus
// ------------------
.tab-focus() {
// Default
outline: thin dotted #333;
...
...
@@ -34,7 +37,6 @@
}
// Center-align a block level element
// ----------------------------------
.center-block() {
display: block;
margin-left: auto;
...
...
@@ -42,7 +44,6 @@
}
// Sizing shortcuts
// -------------------------
.size(@width, @height) {
width: @width;
height: @height;
...
...
@@ -52,7 +53,6 @@
}
// Placeholder text
// -------------------------
.placeholder(@color: @input-color-placeholder) {
&:-moz-placeholder {
color: @color;
...
...
@@ -66,7 +66,6 @@
}
// Text overflow
// -------------------------
// Requires inline-block or block for proper styling
.text-overflow() {
overflow: hidden;
...
...
@@ -75,7 +74,6 @@
}
// CSS image replacement
// -------------------------
// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
.hide-text() {
font: 0/0 a;
...
...
This diff is collapsed.
Click to expand it.
less/utilities.less
+
2
-
2
View file @
840e47ea
...
...
@@ -6,8 +6,8 @@
// Floats
// -------------------------
.clear {
.clear
fix
();
.clear
fix
{
.clear
_float
();
}
.pull-right {
float: right;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment