aboutsummaryrefslogtreecommitdiff
path: root/less
diff options
context:
space:
mode:
authorfat <[email protected]>2013-08-04 15:45:51 -0700
committerfat <[email protected]>2013-08-04 15:45:51 -0700
commitf22a077f6ea0e0d85d9899a1f44eab4733ca6af6 (patch)
tree95c0b4c0bedd3a2ac1aa61e03d0ead12c7827f4f /less
parentb1d21731adfc04adb654133988f3c8e444d8b240 (diff)
parentb6390d298aa71e6dccb10e539097fbc7aaa45b8a (diff)
downloadbootstrap-f22a077f6ea0e0d85d9899a1f44eab4733ca6af6.tar.xz
bootstrap-f22a077f6ea0e0d85d9899a1f44eab4733ca6af6.zip
Merge branch '3.0.0-wip' of github.com:twbs/bootstrap into 3.0.0-wip
Diffstat (limited to 'less')
-rw-r--r--less/button-groups.less7
-rw-r--r--less/buttons.less12
-rw-r--r--less/forms.less56
-rw-r--r--less/grid.less2
-rw-r--r--less/input-groups.less47
-rw-r--r--less/navbar.less4
-rw-r--r--less/pagination.less6
-rw-r--r--less/panels.less36
-rw-r--r--less/variables.less6
-rw-r--r--less/wells.less4
10 files changed, 94 insertions, 86 deletions
diff --git a/less/button-groups.less b/less/button-groups.less
index d78815c93..d8eae0a50 100644
--- a/less/button-groups.less
+++ b/less/button-groups.less
@@ -100,7 +100,7 @@
padding-left: 8px;
padding-right: 8px;
}
-.btn-group > .btn-large + .dropdown-toggle {
+.btn-group > .btn-lg + .dropdown-toggle {
padding-left: 12px;
padding-right: 12px;
}
@@ -117,11 +117,11 @@
margin-left: 0;
}
// Carets in other button sizes
-.btn-large .caret {
+.btn-lg .caret {
border-width: 5px;
}
// Upside down carets for .dropup
-.dropup .btn-large .caret {
+.dropup .btn-lg .caret {
border-bottom-width: 5px;
}
@@ -157,6 +157,7 @@
.btn-group-justified {
display: table;
width: 100%;
+ table-layout: fixed;
.btn {
float: none;
display: table-cell;
diff --git a/less/buttons.less b/less/buttons.less
index c206179df..8fad99cc8 100644
--- a/less/buttons.less
+++ b/less/buttons.less
@@ -120,20 +120,20 @@
// Button Sizes
// --------------------------------------------------
-.btn-large {
+.btn-lg {
padding: @padding-large-vertical @padding-large-horizontal;
font-size: @font-size-large;
- line-height: 1.33; // ensure even-numbered height of butotn next to large input
+ line-height: @line-height-large; // ensure even-numbered height of button next to large input
border-radius: @border-radius-large;
}
-.btn-small,
-.btn-mini {
+.btn-sm,
+.btn-xs {
padding: @padding-small-vertical @padding-small-horizontal;
font-size: @font-size-small;
- line-height: 1.5; // ensure proper height of button next to small input
+ line-height: @line-height-small; // ensure proper height of button next to small input
border-radius: @border-radius-small;
}
-.btn-mini {
+.btn-xs {
padding: 3px 5px;
}
diff --git a/less/forms.less b/less/forms.less
index 494d328c0..127f6a67a 100644
--- a/less/forms.less
+++ b/less/forms.less
@@ -218,14 +218,14 @@ input[type="number"] {
// horizontal sizing, wrap controls in the predefined grid classes. `<select>`
// element gets special love because it's special, and that's a fact!
-.input-large {
+.input-lg {
height: @input-height-large;
padding: @padding-large-vertical @padding-large-horizontal;
font-size: @font-size-large;
line-height: @line-height-large;
border-radius: @border-radius-large;
}
-.input-small {
+.input-sm {
height: @input-height-small;
padding: @padding-small-vertical @padding-small-horizontal;
font-size: @font-size-small;
@@ -234,18 +234,18 @@ input[type="number"] {
}
select {
- &.input-large {
+ &.input-lg {
height: @input-height-large;
line-height: @input-height-large;
}
- &.input-small {
+ &.input-sm {
height: @input-height-small;
line-height: @input-height-small;
}
}
textarea {
- &.input-large,
- &.input-small {
+ &.input-lg,
+ &.input-sm {
height: auto;
}
}
@@ -280,3 +280,47 @@ textarea {
margin-bottom: 10px;
color: lighten(@text-color, 25%); // lighten the text some for contrast
}
+
+
+
+// Inline forms
+//
+// Make forms appear inline(-block).
+
+.form-inline {
+ .form-control,
+ .radio,
+ .checkbox {
+ display: inline-block;
+ }
+ .radio,
+ .checkbox {
+ margin-top: 0;
+ margin-bottom: 0;
+ }
+}
+
+
+// Horizontal forms
+//
+// Horizontal forms are built on grid classes and allow you to create forms with
+// labels on the left and inputs on the right.
+
+.form-horizontal .control-label,
+.form-horizontal .radio-inline,
+.form-horizontal .checkbox-inline {
+ padding-top: 9px;
+}
+
+.form-horizontal {
+ .form-group {
+ .make-row();
+ }
+}
+
+// Only right align form labels here when the columns stop stacking
+@media (min-width: @screen-tablet) {
+ .form-horizontal .control-label {
+ text-align: right;
+ }
+}
diff --git a/less/grid.less b/less/grid.less
index dfaf4f970..395a7947f 100644
--- a/less/grid.less
+++ b/less/grid.less
@@ -63,7 +63,7 @@
// Container and grid column sizing
//
-// Tiny device columns (smartphones)
+// Extra small device columns (smartphones)
.col-1,
.col-2,
.col-3,
diff --git a/less/input-groups.less b/less/input-groups.less
index 3586beef7..79d1afcd4 100644
--- a/less/input-groups.less
+++ b/less/input-groups.less
@@ -55,15 +55,17 @@
border-radius: @border-radius-base;
// Sizing
- &.input-small {
+ &.input-sm {
padding: @padding-small-vertical @padding-small-horizontal;
font-size: @font-size-small;
border-radius: @border-radius-small;
+ line-height: @line-height-small;
}
- &.input-large {
+ &.input-lg {
padding: @padding-large-vertical @padding-large-horizontal;
font-size: @font-size-large;
border-radius: @border-radius-large;
+ line-height: @line-height-large;
}
// Nuke default margins from checkboxes and radios to vertically center within.
@@ -113,44 +115,3 @@
z-index: 2;
}
}
-
-
-// Inline forms
-// --------------------------------------------------
-
-.form-inline {
- .form-control,
- .radio,
- .checkbox {
- display: inline-block;
- }
- .radio,
- .checkbox {
- margin-top: 0;
- margin-bottom: 0;
- }
-}
-
-
-// Horizontal forms
-// --------------------------------------------------
-// Horizontal forms are built on grid classes.
-
-.form-horizontal .control-label,
-.form-horizontal .radio-inline,
-.form-horizontal .checkbox-inline {
- padding-top: 9px;
-}
-
-.form-horizontal {
- .form-group {
- .make-row();
- }
-}
-
-// Only right align form labels here when the columns stop stacking
-@media (min-width: @screen-tablet) {
- .form-horizontal .control-label {
- text-align: right;
- }
-}
diff --git a/less/navbar.less b/less/navbar.less
index 653a8d6d9..8234fc099 100644
--- a/less/navbar.less
+++ b/less/navbar.less
@@ -28,7 +28,7 @@
padding-top: ((@navbar-height - @line-height-computed) / 2);
padding-bottom: ((@navbar-height - @line-height-computed) / 2);
color: @navbar-link-color;
- line-height: 20px;
+ line-height: @line-height-computed;
border-radius: @border-radius-base;
&:hover,
&:focus {
@@ -354,6 +354,8 @@
// Add a class to make any element properly align itself vertically within the navbars.
.navbar-text {
+ float: left;
+ padding: 0 @navbar-padding-horizontal;
.navbar-vertical-align(@line-height-computed);
}
diff --git a/less/pagination.less b/less/pagination.less
index 6720c6898..65679beff 100644
--- a/less/pagination.less
+++ b/less/pagination.less
@@ -12,7 +12,7 @@
> a,
> span {
float: left; // Collapse white-space
- padding: 4px 12px;
+ padding: @padding-base-vertical @padding-base-horizontal;
line-height: @line-height-base;
text-decoration: none;
background-color: @pagination-bg;
@@ -62,7 +62,7 @@
// --------------------------------------------------
// Large
-.pagination-large {
+.pagination-lg {
> li {
> a,
> span {
@@ -85,7 +85,7 @@
}
// Small
-.pagination-small {
+.pagination-sm {
> li {
> a,
> span {
diff --git a/less/panels.less b/less/panels.less
index 691a15545..715ae1873 100644
--- a/less/panels.less
+++ b/less/panels.less
@@ -11,6 +11,24 @@
border: 1px solid @panel-border;
border-radius: @panel-border-radius;
.box-shadow(0 1px 1px rgba(0,0,0,.05));
+
+ // List groups in panels
+ .list-group {
+ margin: 15px -15px -15px;
+
+ .list-group-item {
+ border-width: 1px 0;
+
+ // Remove border radius for top one
+ &:first-child {
+ .border-top-radius(0);
+ }
+ // But keep it for the last one
+ &:last-child {
+ border-bottom: 0;
+ }
+ }
+ }
}
// Optional heading
@@ -82,21 +100,3 @@
border-color: @panel-info-border;
}
}
-
-// List groups in panels
-.list-group-flush {
- margin: 15px -15px -15px;
-
- .list-group-item {
- border-width: 1px 0;
-
- // Remove border radius for top one
- &:first-child {
- .border-top-radius(0);
- }
- // But keep it for the last one
- &:last-child {
- border-bottom: 0;
- }
- }
-}
diff --git a/less/variables.less b/less/variables.less
index a869ce960..a500097c9 100644
--- a/less/variables.less
+++ b/less/variables.less
@@ -180,9 +180,9 @@
// Media queries breakpoints
// --------------------------------------------------
-// Tiny screen / phone
-@screen-tiny: 480px;
-@screen-phone: @screen-tiny;
+// Extra small screen / phone
+@screen-xsmall: 480px;
+@screen-phone: @screen-xsmall;
// Small screen / tablet
@screen-small: 768px;
diff --git a/less/wells.less b/less/wells.less
index 6a909f44b..865abc2eb 100644
--- a/less/wells.less
+++ b/less/wells.less
@@ -19,11 +19,11 @@
}
// Sizes
-.well-large {
+.well-lg {
padding: 24px;
border-radius: @border-radius-large;
}
-.well-small {
+.well-sm {
padding: 9px;
border-radius: @border-radius-small;
}