Commit c11f41ba authored by Mark Otto's avatar Mark Otto

flatten buttons and forms

parent 7c04d573
This diff is collapsed.
......@@ -223,10 +223,10 @@
<p>Make a set of buttons appear vertically stacked rather than horizontally.</p>
<div class="bs-docs-example">
<div class="btn-group btn-group-vertical">
<button type="button" class="btn"><i class="icon-align-left"></i></button>
<button type="button" class="btn"><i class="icon-align-center"></i></button>
<button type="button" class="btn"><i class="icon-align-right"></i></button>
<button type="button" class="btn"><i class="icon-align-justify"></i></button>
<button type="button" class="btn"><i class="glyphicon-align-left"></i></button>
<button type="button" class="btn"><i class="glyphicon-align-center"></i></button>
<button type="button" class="btn"><i class="glyphicon-align-right"></i></button>
<button type="button" class="btn"><i class="glyphicon-align-justify"></i></button>
</div>
</div>
<pre class="prettyprint linenums">
......
......@@ -155,10 +155,10 @@
<p>Make a set of buttons appear vertically stacked rather than horizontally.</p>
<div class="bs-docs-example">
<div class="btn-group btn-group-vertical">
<button type="button" class="btn"><i class="icon-align-left"></i></button>
<button type="button" class="btn"><i class="icon-align-center"></i></button>
<button type="button" class="btn"><i class="icon-align-right"></i></button>
<button type="button" class="btn"><i class="icon-align-justify"></i></button>
<button type="button" class="btn"><i class="glyphicon-align-left"></i></button>
<button type="button" class="btn"><i class="glyphicon-align-center"></i></button>
<button type="button" class="btn"><i class="glyphicon-align-right"></i></button>
<button type="button" class="btn"><i class="glyphicon-align-justify"></i></button>
</div>
</div>
<pre class="prettyprint linenums">
......
......@@ -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;
......
......@@ -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);
}
......
......@@ -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));
}
}
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment