Skip to content

Commit e27b135

Browse files
committed
fixes twbs#4771: widen .form-horizontal labels and .dl-horizontal terms given larger font-size of 2.1.0
1 parent 545edf5 commit e27b135

File tree

5 files changed

+18
-13
lines changed

5 files changed

+18
-13
lines changed

docs/assets/css/bootstrap.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ dd {
743743

744744
.dl-horizontal dt {
745745
float: left;
746-
width: 120px;
746+
width: 160px;
747747
overflow: hidden;
748748
clear: left;
749749
text-align: right;
@@ -752,7 +752,7 @@ dd {
752752
}
753753

754754
.dl-horizontal dd {
755-
margin-left: 130px;
755+
margin-left: 180px;
756756
}
757757

758758
hr {
@@ -1775,20 +1775,20 @@ legend + .control-group {
17751775

17761776
.form-horizontal .control-label {
17771777
float: left;
1778-
width: 140px;
1778+
width: 160px;
17791779
padding-top: 5px;
17801780
text-align: right;
17811781
}
17821782

17831783
.form-horizontal .controls {
17841784
*display: inline-block;
17851785
*padding-left: 20px;
1786-
margin-left: 160px;
1786+
margin-left: 180px;
17871787
*margin-left: 0;
17881788
}
17891789

17901790
.form-horizontal .controls:first-child {
1791-
*padding-left: 160px;
1791+
*padding-left: 180px;
17921792
}
17931793

17941794
.form-horizontal .help-block {
@@ -1802,7 +1802,7 @@ legend + .control-group {
18021802
}
18031803

18041804
.form-horizontal .form-actions {
1805-
padding-left: 160px;
1805+
padding-left: 180px;
18061806
}
18071807

18081808
table {

docs/assets/js/bootstrap.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

less/forms.less

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ legend + .control-group {
615615
// Float the labels left
616616
.control-label {
617617
float: left;
618-
width: 140px;
618+
width: @horizontalComponentOffset - 20;
619619
padding-top: 5px;
620620
text-align: right;
621621
}
@@ -625,10 +625,10 @@ legend + .control-group {
625625
// don't inherit the margin of the parent, in this case .controls
626626
*display: inline-block;
627627
*padding-left: 20px;
628-
margin-left: 160px;
628+
margin-left: @horizontalComponentOffset;
629629
*margin-left: 0;
630630
&:first-child {
631-
*padding-left: 160px;
631+
*padding-left: @horizontalComponentOffset;
632632
}
633633
}
634634
// Remove bottom margin on block level help text since that's accounted for on .control-group
@@ -645,6 +645,6 @@ legend + .control-group {
645645
}
646646
// Move over buttons in .form-actions to align with .controls
647647
.form-actions {
648-
padding-left: 160px;
648+
padding-left: @horizontalComponentOffset;
649649
}
650650
}

less/type.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,13 @@ dd {
119119
.clearfix(); // Ensure dl clears floats if empty dd elements present
120120
dt {
121121
float: left;
122-
width: 120px;
122+
width: @horizontalComponentOffset - 20;
123123
clear: left;
124124
text-align: right;
125125
.text-overflow();
126126
}
127127
dd {
128-
margin-left: 130px;
128+
margin-left: @horizontalComponentOffset;
129129
}
130130
}
131131

less/variables.less

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@
144144
@hrBorder: @grayLighter;
145145

146146

147+
// Horizontal forms & lists
148+
// -------------------------
149+
@horizontalComponentOffset: 180px;
150+
151+
147152
// Wells
148153
// -------------------------
149154
@wellBackground: #f5f5f5;

0 commit comments

Comments
 (0)