aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2011-09-11 20:09:20 -0700
committerJacob Thornton <[email protected]>2011-09-11 20:09:20 -0700
commite255b4f51dd690cbdcf75a1a7e93ddc5c07499f2 (patch)
tree8240da6f42f42b458210fcc33c8df60aecb8aec9 /lib
parent173be3f1e87a83f8e85bef8ddb979a921ccee9d1 (diff)
parent2674210ff06a9ceaaa98263a2cbe2246fcd21111 (diff)
downloadbootstrap-e255b4f51dd690cbdcf75a1a7e93ddc5c07499f2.tar.xz
bootstrap-e255b4f51dd690cbdcf75a1a7e93ddc5c07499f2.zip
Merge branch '1.3-wip' of github.com:twitter/bootstrap into 1.3-wip
Diffstat (limited to 'lib')
-rw-r--r--lib/forms.less36
-rw-r--r--lib/patterns.less30
-rw-r--r--lib/scaffolding.less106
3 files changed, 101 insertions, 71 deletions
diff --git a/lib/forms.less b/lib/forms.less
index 2333718e0..c86751193 100644
--- a/lib/forms.less
+++ b/lib/forms.less
@@ -19,9 +19,9 @@ fieldset {
padding-left: 150px;
font-size: @basefont * 1.5;
line-height: 1;
- *margin: 0 0 5px 145px; /* IE6-7 */
- *line-height: 1.5; /* IE6-7 */
color: @grayDark;
+ *padding: 0 0 5px 145px; /* IE6-7 */
+ *line-height: 1.5; /* IE6-7 */
}
}
@@ -105,8 +105,9 @@ input[type=submit] {
select,
input[type=file] {
- height: @baseline * 1.5;
+ height: @baseline * 1.5; // In IE7, the height of the select element cannot be changed by height, only font-size
line-height: @baseline * 1.5;
+ *margin-top: 4px; /* For IE7, add top margin to align select with labels */
}
textarea {
@@ -183,6 +184,7 @@ form div.error {
}
// Form element sizes
+// TODO v2: remove duplication here and just stick to .input-[size] in light of adding .spanN sizes
.input-mini,
input.mini,
textarea.mini,
@@ -223,6 +225,34 @@ textarea.xxlarge {
overflow-y: auto;
}
+// Grid style input sizes
+// This is a duplication of the main grid .columns() mixin, but subtracts 10px to account for input padding and border
+.formColumns(@columnSpan: 1) {
+ width: ((@gridColumnWidth - 10) * @columnSpan) + ((@gridColumnWidth - 10) * (@columnSpan - 1));
+ margin-left: 0;
+}
+input,
+textarea,
+select {
+ // Default columns
+ &.span1 { .formColumns(1); }
+ &.span2 { .formColumns(2); }
+ &.span3 { .formColumns(3); }
+ &.span4 { .formColumns(4); }
+ &.span5 { .formColumns(5); }
+ &.span6 { .formColumns(6); }
+ &.span7 { .formColumns(7); }
+ &.span8 { .formColumns(8); }
+ &.span9 { .formColumns(9); }
+ &.span10 { .formColumns(10); }
+ &.span11 { .formColumns(11); }
+ &.span12 { .formColumns(12); }
+ &.span13 { .formColumns(13); }
+ &.span14 { .formColumns(14); }
+ &.span15 { .formColumns(15); }
+ &.span16 { .formColumns(16); }
+}
+
// Disabled and read-only inputs
input[disabled],
select[disabled],
diff --git a/lib/patterns.less b/lib/patterns.less
index 1e601adf4..88f56ea59 100644
--- a/lib/patterns.less
+++ b/lib/patterns.less
@@ -33,19 +33,19 @@
// Website name
// h3 left for backwards compatibility
- .brand,
h3 {
position: relative;
- a {
- float: left;
- display: block;
- padding: 8px 20px 12px;
- margin-left: -20px; // negative indent to left-align the text down the page
- color: @white;
- font-size: 20px;
- font-weight: 200;
- line-height: 1;
- }
+ }
+ h3 a,
+ .brand {
+ float: left;
+ display: block;
+ padding: 8px 20px 12px;
+ margin-left: -20px; // negative indent to left-align the text down the page
+ color: @white;
+ font-size: 20px;
+ font-weight: 200;
+ line-height: 1;
}
// Plain text in topbar
@@ -941,19 +941,19 @@ input[type=submit].btn {
li {
display: inline;
}
- .thumbnail {
+ a {
float: left;
padding: 4px;
margin: 0 0 20px 20px;
border: 1px solid #ddd;
.border-radius(4px);
.box-shadow(0 1px 1px rgba(0,0,0,.075));
+ img {
+ display: block;
+ }
&:hover {
border-color: @linkColor;
.box-shadow(0 1px 4px rgba(0,105,214,.25));
}
}
- img {
- display: block;
- }
}
diff --git a/lib/scaffolding.less b/lib/scaffolding.less
index 263087b06..2dc67c653 100644
--- a/lib/scaffolding.less
+++ b/lib/scaffolding.less
@@ -79,58 +79,58 @@ a {
.row {
.clearfix();
margin-left: -1 * @gridGutterWidth;
+}
- // Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7)
- // Credit to @dhg for the idea
- [class*="span"] {
- .gridColumn();
- }
+// Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7)
+// Credit to @dhg for the idea
+[class*="span"] {
+ .gridColumn();
+}
- // Default columns
- .span1 { .columns(1); }
- .span2 { .columns(2); }
- .span3 { .columns(3); }
- .span4 { .columns(4); }
- .span5 { .columns(5); }
- .span6 { .columns(6); }
- .span7 { .columns(7); }
- .span8 { .columns(8); }
- .span9 { .columns(9); }
- .span10 { .columns(10); }
- .span11 { .columns(11); }
- .span12 { .columns(12); }
- .span13 { .columns(13); }
- .span14 { .columns(14); }
- .span15 { .columns(15); }
- .span16 { .columns(16); }
-
- // For optional 24-column grid
- .span17 { .columns(17); }
- .span18 { .columns(18); }
- .span19 { .columns(19); }
- .span20 { .columns(20); }
- .span21 { .columns(21); }
- .span22 { .columns(22); }
- .span23 { .columns(23); }
- .span24 { .columns(24); }
-
- // Offset column options
- .offset1 { .offset(1); }
- .offset2 { .offset(2); }
- .offset3 { .offset(3); }
- .offset4 { .offset(4); }
- .offset5 { .offset(5); }
- .offset6 { .offset(6); }
- .offset7 { .offset(7); }
- .offset8 { .offset(8); }
- .offset9 { .offset(9); }
- .offset10 { .offset(10); }
- .offset11 { .offset(11); }
- .offset12 { .offset(12); }
-
- // Unique column sizes for 16-column grid
- .span-one-third { width: 300px; }
- .span-two-thirds { width: 620px; }
- .offset-one-third { margin-left: 340px; }
- .offset-two-thirds { margin-left: 660px; }
-} \ No newline at end of file
+// Default columns
+.span1 { .columns(1); }
+.span2 { .columns(2); }
+.span3 { .columns(3); }
+.span4 { .columns(4); }
+.span5 { .columns(5); }
+.span6 { .columns(6); }
+.span7 { .columns(7); }
+.span8 { .columns(8); }
+.span9 { .columns(9); }
+.span10 { .columns(10); }
+.span11 { .columns(11); }
+.span12 { .columns(12); }
+.span13 { .columns(13); }
+.span14 { .columns(14); }
+.span15 { .columns(15); }
+.span16 { .columns(16); }
+
+// For optional 24-column grid
+.span17 { .columns(17); }
+.span18 { .columns(18); }
+.span19 { .columns(19); }
+.span20 { .columns(20); }
+.span21 { .columns(21); }
+.span22 { .columns(22); }
+.span23 { .columns(23); }
+.span24 { .columns(24); }
+
+// Offset column options
+.offset1 { .offset(1); }
+.offset2 { .offset(2); }
+.offset3 { .offset(3); }
+.offset4 { .offset(4); }
+.offset5 { .offset(5); }
+.offset6 { .offset(6); }
+.offset7 { .offset(7); }
+.offset8 { .offset(8); }
+.offset9 { .offset(9); }
+.offset10 { .offset(10); }
+.offset11 { .offset(11); }
+.offset12 { .offset(12); }
+
+// Unique column sizes for 16-column grid
+.span-one-third { width: 300px; }
+.span-two-thirds { width: 620px; }
+.offset-one-third { margin-left: 340px; }
+.offset-two-thirds { margin-left: 660px; } \ No newline at end of file