aboutsummaryrefslogtreecommitdiff
path: root/less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2012-12-21 00:50:28 -0800
committerMark Otto <[email protected]>2012-12-21 00:50:28 -0800
commitc11f41ba04791a0c408071527994dfb22c91a436 (patch)
treefdc17547ec028e8a9dcbeb43320eb25f09f17efb /less
parent7c04d573d0a08a365f3350c9d52d7cc870f702be (diff)
downloadbootstrap-c11f41ba04791a0c408071527994dfb22c91a436.tar.xz
bootstrap-c11f41ba04791a0c408071527994dfb22c91a436.zip
flatten buttons and forms
Diffstat (limited to 'less')
-rw-r--r--less/button-groups.less42
-rw-r--r--less/buttons.less23
-rw-r--r--less/forms.less5
-rw-r--r--less/navbar.less6
4 files changed, 35 insertions, 41 deletions
diff --git a/less/button-groups.less b/less/button-groups.less
index 04f3e5d72..7113b583c 100644
--- a/less/button-groups.less
+++ b/less/button-groups.less
@@ -7,24 +7,23 @@
.btn-group {
position: relative;
display: inline-block;
- font-size: 0; // remove as part 1 of font-size inline-block hack
vertical-align: middle; // match .btn alignment given font-size hack above
- white-space: nowrap; // prevent buttons from wrapping when in tight spaces (e.g., the table on the tests page)
-}
-
-// Space out series of button groups
-.btn-group + .btn-group {
- margin-left: 5px;
+ > .btn {
+ float: left;
+ }
}
// Optional: Group multiple button groups together for a toolbar
.btn-toolbar {
- font-size: 0; // Hack to remove whitespace that results from using inline-block
- margin-top: @line-height-base / 2;
- margin-bottom: @line-height-base / 2;
+ .clearfix();
+ .btn-group {
+ float: left;
+ }
+ // Space out series of button groups
> .btn + .btn,
> .btn-group + .btn,
- > .btn + .btn-group {
+ > .btn + .btn-group,
+ > .btn-group + .btn-group {
margin-left: 5px;
}
}
@@ -35,12 +34,7 @@
border-radius: 0;
}
.btn-group > .btn + .btn {
- margin-left: -1px;
-}
-.btn-group > .btn,
-.btn-group > .dropdown-menu,
-.btn-group > .popover {
- font-size: @font-size-base; // redeclare as part 2 of font-size inline-block hack
+ margin-left: 1px;
}
// Reset fonts for other sizes
@@ -78,14 +72,6 @@
border-bottom-right-radius: @border-radius-large;
}
-// On hover/focus/active, bring the proper btn to front
-.btn-group > .btn:hover,
-.btn-group > .btn:focus,
-.btn-group > .btn:active,
-.btn-group > .btn.active {
- z-index: 2;
-}
-
// On active and open, don't show outline
.btn-group .dropdown-toggle:active,
.btn-group.open .dropdown-toggle {
@@ -101,7 +87,6 @@
.btn-group > .btn + .dropdown-toggle {
padding-left: 8px;
padding-right: 8px;
- .box-shadow(~"inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
}
.btn-group > .btn-mini + .dropdown-toggle {
padding-left: 5px;
@@ -118,7 +103,7 @@
// Remove the gradient and set the same inset shadow as the :active state
.dropdown-toggle {
background-image: none;
- .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)");
+ .box-shadow(inset 0 2px 4px rgba(0,0,0,.15));
}
// Keep the hover's background when dropdown is open
@@ -184,7 +169,6 @@
// ----------------------
.btn-group-vertical {
- display: inline-block; // Make buttons only take up the width they need
}
.btn-group-vertical > .btn {
display: block;
@@ -194,7 +178,7 @@
}
.btn-group-vertical > .btn + .btn {
margin-left: 0;
- margin-top: -1px;
+ margin-top: 1px;
}
.btn-group-vertical .btn:first-child {
border-radius: @border-radius-base @border-radius-base 0 0;
diff --git a/less/buttons.less b/less/buttons.less
index fe80fa44b..b9ed8e330 100644
--- a/less/buttons.less
+++ b/less/buttons.less
@@ -9,16 +9,17 @@
// Core styles
.btn {
display: inline-block;
- padding: 6px 13px;
+ padding: 7px 13px;
margin-bottom: 0; // For input.btn
font-size: @font-size-base;
+ font-weight: bold;
line-height: @line-height-base;
text-align: center;
vertical-align: middle;
cursor: pointer;
- border: 1px solid #ccc;
+ border: 0;
border-radius: @border-radius-base;
- .box-shadow(inset 0 1px 0 rgba(255,255,255,.25));
+ //.box-shadow(inset 0 1px 0 rgba(255,255,255,.25));
&:focus {
.tab-focus();
@@ -114,23 +115,29 @@ input[type="button"] {
// --------------------------------------------------
.btn {
- .buttonBackground(@btn-background, @btn-background-highlight, @gray, 0 1px 0 rgba(255,255,255,.75));
+ color: #fff;
+ background-color: #ccc;
+ //.buttonBackground(@btn-background, @btn-background-highlight, @gray, 0 1px 0 rgba(255,255,255,.75));
}
// Primary appears as blue
.btn-primary {
- .buttonBackground(@btn-background-primary, @btn-background-primary-highlight);
+ background-color: @btn-background-primary;
+ //.buttonBackground(@btn-background-primary, @btn-background-primary-highlight);
}
// Warning appears are orange
.btn-warning {
- .buttonBackground(@btn-background-warning, @btn-background-warning-highlight);
+ background-color: @btn-background-warning;
+ //.buttonBackground(@btn-background-warning, @btn-background-warning-highlight);
}
// Danger and error appear as red
.btn-danger {
- .buttonBackground(@btn-background-danger, @btn-background-danger-highlight);
+ background-color: @btn-background-danger;
+ //.buttonBackground(@btn-background-danger, @btn-background-danger-highlight);
}
// Success appears as green
.btn-success {
- .buttonBackground(@btn-background-success, @btn-background-success-highlight);
+ background-color: @btn-background-success;
+ //.buttonBackground(@btn-background-success, @btn-background-success-highlight);
}
diff --git a/less/forms.less b/less/forms.less
index dc4e7ffd9..5ea1d3cf1 100644
--- a/less/forms.less
+++ b/less/forms.less
@@ -67,7 +67,7 @@ input[type="color"],
background-color: @input-background;
border: 1px solid @input-border;
border-radius: @input-border-radius;
- .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
+ // .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
.transition(~"border linear .2s, box-shadow linear .2s");
}
@@ -118,7 +118,8 @@ input[type="color"],
border-color: rgba(82,168,236,.8);
outline: 0;
outline: thin dotted \9; /* IE6-9 */
- .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");
+ //.box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");
+ .box-shadow(0 0 8px rgba(82,168,236,.6));
}
}
diff --git a/less/navbar.less b/less/navbar.less
index 943400dfb..4abd17ab7 100644
--- a/less/navbar.less
+++ b/less/navbar.less
@@ -11,7 +11,8 @@
overflow: visible;
padding: 0 20px;
margin-bottom: @line-height-base;
- #gradient > .vertical(@navbar-background-highlight, @navbar-background);
+ background-color: @navbar-background;
+ //#gradient > .vertical(@navbar-background-highlight, @navbar-background);
border: 1px solid @navbar-border;
border-radius: @border-radius-base;
.box-shadow(0 1px 4px rgba(0,0,0,.065));
@@ -362,7 +363,8 @@
// -------------------------
.navbar-inverse {
- #gradient > .vertical(@navbar-inverse-background-highlight, @navbar-inverse-background);
+ background-color: @navbar-inverse-background;
+ //#gradient > .vertical(@navbar-inverse-background-highlight, @navbar-inverse-background);
border-color: @navbar-inverse-border;
.brand,