]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
flatten buttons and forms
authorMark Otto <otto@github.com>
Fri, 21 Dec 2012 08:50:28 +0000 (00:50 -0800)
committerMark Otto <otto@github.com>
Fri, 21 Dec 2012 08:50:28 +0000 (00:50 -0800)
docs/assets/css/bootstrap.css
docs/components.html
docs/templates/pages/components.mustache
less/button-groups.less
less/buttons.less
less/forms.less
less/navbar.less

index 44581d473cc13078eef132723552853d4c41a758..f186dd73697b62933d959167402e9068312a7689 100644 (file)
@@ -847,8 +847,6 @@ input[type="color"],
   background-color: #ffffff;
   border: 1px solid #cccccc;
   border-radius: 4px;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
   -webkit-box-sizing: border-box;
      -moz-box-sizing: border-box;
           box-sizing: border-box;
@@ -900,8 +898,8 @@ input[type="color"]:focus,
   outline: thin dotted \9;
   /* IE6-9 */
 
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
-          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+  -webkit-box-shadow: 0 0 8px rgba(82, 168, 236, 0.6);
+          box-shadow: 0 0 8px rgba(82, 168, 236, 0.6);
 }
 
 input[type="radio"],
@@ -2576,17 +2574,16 @@ button.close {
 
 .btn {
   display: inline-block;
-  padding: 6px 13px;
+  padding: 7px 13px;
   margin-bottom: 0;
   font-size: 14px;
+  font-weight: bold;
   line-height: 20px;
   text-align: center;
   vertical-align: middle;
   cursor: pointer;
-  border: 1px solid #ccc;
+  border: 0;
   border-radius: 4px;
-  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
-          box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
 }
 
 .btn:focus {
@@ -2670,153 +2667,24 @@ input[type="button"].btn-block {
 }
 
 .btn {
-  color: #555555;
-  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
-  background-color: #eaeaea;
-  background-image: -moz-linear-gradient(top, #ffffff, #eaeaea);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#eaeaea));
-  background-image: -webkit-linear-gradient(top, #ffffff, #eaeaea);
-  background-image: -o-linear-gradient(top, #ffffff, #eaeaea);
-  background-image: linear-gradient(to bottom, #ffffff, #eaeaea);
-  background-repeat: repeat-x;
-  border-color: #d7d7d7;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeaeaea', GradientType=0);
-}
-
-.btn:hover,
-.btn:active,
-.btn.active {
-  color: #555555;
-  background-color: #eaeaea;
-  background-position: 0 -15px;
-}
-
-.btn:active,
-.btn.active,
-.btn[disabled],
-.btn.disabled,
-fieldset[disabled] .btn {
-  background-image: none;
+  color: #fff;
+  background-color: #ccc;
 }
 
 .btn-primary {
-  color: #ffffff;
-  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-  background-color: #006699;
-  background-image: -moz-linear-gradient(top, #0088cc, #006699);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#006699));
-  background-image: -webkit-linear-gradient(top, #0088cc, #006699);
-  background-image: -o-linear-gradient(top, #0088cc, #006699);
-  background-image: linear-gradient(to bottom, #0088cc, #006699);
-  background-repeat: repeat-x;
-  border-color: #004c73;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff006699', GradientType=0);
-}
-
-.btn-primary:hover,
-.btn-primary:active,
-.btn-primary.active {
-  color: #ffffff;
-  background-color: #006699;
-  background-position: 0 -15px;
-}
-
-.btn-primary:active,
-.btn-primary.active,
-.btn-primary[disabled],
-.btn-primary.disabled,
-fieldset[disabled] .btn-primary {
-  background-image: none;
+  background-color: #0088cc;
 }
 
 .btn-warning {
-  color: #ffffff;
-  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-  background-color: #f89406;
-  background-image: -moz-linear-gradient(top, #fbb450, #f89406);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
-  background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
-  background-image: -o-linear-gradient(top, #fbb450, #f89406);
-  background-image: linear-gradient(to bottom, #fbb450, #f89406);
-  background-repeat: repeat-x;
-  border-color: #d37e05;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
-}
-
-.btn-warning:hover,
-.btn-warning:active,
-.btn-warning.active {
-  color: #ffffff;
-  background-color: #f89406;
-  background-position: 0 -15px;
-}
-
-.btn-warning:active,
-.btn-warning.active,
-.btn-warning[disabled],
-.btn-warning.disabled,
-fieldset[disabled] .btn-warning {
-  background-image: none;
+  background-color: #fbb450;
 }
 
 .btn-danger {
-  color: #ffffff;
-  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-  background-color: #bd362f;
-  background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
-  background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
-  background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
-  background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);
-  background-repeat: repeat-x;
-  border-color: #9e2d27;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);
-}
-
-.btn-danger:hover,
-.btn-danger:active,
-.btn-danger.active {
-  color: #ffffff;
-  background-color: #bd362f;
-  background-position: 0 -15px;
-}
-
-.btn-danger:active,
-.btn-danger.active,
-.btn-danger[disabled],
-.btn-danger.disabled,
-fieldset[disabled] .btn-danger {
-  background-image: none;
+  background-color: #ee5f5b;
 }
 
 .btn-success {
-  color: #ffffff;
-  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-  background-color: #51a351;
-  background-image: -moz-linear-gradient(top, #62c462, #51a351);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
-  background-image: -webkit-linear-gradient(top, #62c462, #51a351);
-  background-image: -o-linear-gradient(top, #62c462, #51a351);
-  background-image: linear-gradient(to bottom, #62c462, #51a351);
-  background-repeat: repeat-x;
-  border-color: #448944;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);
-}
-
-.btn-success:hover,
-.btn-success:active,
-.btn-success.active {
-  color: #ffffff;
-  background-color: #51a351;
-  background-position: 0 -15px;
-}
-
-.btn-success:active,
-.btn-success.active,
-.btn-success[disabled],
-.btn-success.disabled,
-fieldset[disabled] .btn-success {
-  background-image: none;
+  background-color: #62c462;
 }
 
 .btn-link,
@@ -2851,24 +2719,31 @@ fieldset[disabled] .btn-link:hover {
 .btn-group {
   position: relative;
   display: inline-block;
-  font-size: 0;
-  white-space: nowrap;
   vertical-align: middle;
 }
 
-.btn-group + .btn-group {
-  margin-left: 5px;
+.btn-group > .btn {
+  float: left;
 }
 
-.btn-toolbar {
-  margin-top: 10px;
-  margin-bottom: 10px;
-  font-size: 0;
+.btn-toolbar:before,
+.btn-toolbar:after {
+  display: table;
+  content: " ";
+}
+
+.btn-toolbar:after {
+  clear: both;
+}
+
+.btn-toolbar .btn-group {
+  float: left;
 }
 
 .btn-toolbar > .btn + .btn,
 .btn-toolbar > .btn-group + .btn,
-.btn-toolbar > .btn + .btn-group {
+.btn-toolbar > .btn + .btn-group,
+.btn-toolbar > .btn-group + .btn-group {
   margin-left: 5px;
 }
 
@@ -2878,13 +2753,7 @@ fieldset[disabled] .btn-link:hover {
 }
 
 .btn-group > .btn + .btn {
-  margin-left: -1px;
-}
-
-.btn-group > .btn,
-.btn-group > .dropdown-menu,
-.btn-group > .popover {
-  font-size: 14px;
+  margin-left: 1px;
 }
 
 .btn-group > .btn-mini {
@@ -2923,13 +2792,6 @@ fieldset[disabled] .btn-link:hover {
   border-bottom-right-radius: 6px;
 }
 
-.btn-group > .btn:hover,
-.btn-group > .btn:focus,
-.btn-group > .btn:active,
-.btn-group > .btn.active {
-  z-index: 2;
-}
-
 .btn-group .dropdown-toggle:active,
 .btn-group.open .dropdown-toggle {
   outline: 0;
@@ -2938,8 +2800,6 @@ fieldset[disabled] .btn-link:hover {
 .btn-group > .btn + .dropdown-toggle {
   padding-right: 8px;
   padding-left: 8px;
-  -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-          box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
 }
 
 .btn-group > .btn-mini + .dropdown-toggle {
@@ -2954,8 +2814,8 @@ fieldset[disabled] .btn-link:hover {
 
 .btn-group.open .dropdown-toggle {
   background-image: none;
-  -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
-          box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
+          box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
 }
 
 .btn-group.open .btn.dropdown-toggle {
@@ -3012,10 +2872,6 @@ fieldset[disabled] .btn-link:hover {
   border-bottom-color: #fff;
 }
 
-.btn-group-vertical {
-  display: inline-block;
-}
-
 .btn-group-vertical > .btn {
   display: block;
   float: none;
@@ -3024,7 +2880,7 @@ fieldset[disabled] .btn-link:hover {
 }
 
 .btn-group-vertical > .btn + .btn {
-  margin-top: -1px;
+  margin-top: 1px;
   margin-left: 0;
 }
 
@@ -3369,15 +3225,8 @@ fieldset[disabled] .btn-link:hover {
   margin-bottom: 20px;
   overflow: visible;
   background-color: #f2f2f2;
-  background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));
-  background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);
-  background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);
-  background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);
-  background-repeat: repeat-x;
   border: 1px solid #d4d4d4;
   border-radius: 4px;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);
   -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
           box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
 }
@@ -3743,14 +3592,7 @@ fieldset[disabled] .navbar .btn-navbar {
 
 .navbar-inverse {
   background-color: #111111;
-  background-image: -moz-linear-gradient(top, #222222, #111111);
-  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));
-  background-image: -webkit-linear-gradient(top, #222222, #111111);
-  background-image: -o-linear-gradient(top, #222222, #111111);
-  background-image: linear-gradient(to bottom, #222222, #111111);
-  background-repeat: repeat-x;
   border-color: #111111;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);
 }
 
 .navbar-inverse .brand,
index ac9dc91ce2ab9d7306fd7c2e26a8f8ba58808455..4f49688f5e006d5aaada0e0f98c0924abf10f8c8 100644 (file)
           <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">
index 4db9d84dce8418f5c74d04836413f838b4f6a8fe..44d86f8a72c98f21aced77ed888f35066f122279 100644 (file)
           <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">
index 04f3e5d72ade41ba6464a641fbb51dbdadc7b41c..7113b583cbe32dfe251befe14ca94c805245a3cc 100644 (file)
@@ -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;
   }
 }
   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
   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 {
 .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;
   // 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
 // ----------------------
 
 .btn-group-vertical {
-  display: inline-block; // Make buttons only take up the width they need
 }
 .btn-group-vertical > .btn {
   display: block;
 }
 .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;
index fe80fa44b9097b1d4b13b8748abf8711e1421bb7..b9ed8e3303014428f229fed01336da77f7034dc4 100644 (file)
@@ -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);
 }
 
 
index dc4e7ffd984a85ce68df62e955fb1590f9c0ceeb..5ea1d3cf198df744a31a8324d40f9bbc36ed7ced 100644 (file)
@@ -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));
   }
 }
 
index 943400dfbb79eba57ab73c949fd8b16d64348286..4abd17ab7ab1eec3be04c0bab79eee743c680b52 100644 (file)
@@ -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));
 // -------------------------
 
 .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,