Skip to content

Commit a968d30

Browse files
committed
overhaul the grid CSS to make it more durable for tables and forms to use the same sizing methods; need to see about improving this in the future
1 parent 948c59d commit a968d30

File tree

6 files changed

+154
-94
lines changed

6 files changed

+154
-94
lines changed

bootstrap.css

Lines changed: 63 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* http://www.apache.org/licenses/LICENSE-2.0
77
*
88
* Designed and built with all the love in the world @twitter by @mdo and @fat.
9-
* Date: Mon Oct 3 21:43:20 PDT 2011
9+
* Date: Mon Oct 3 22:00:55 PDT 2011
1010
*/
1111
/* Reset.less
1212
* Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc).
@@ -264,7 +264,7 @@ a:hover {
264264
.row:after {
265265
clear: both;
266266
}
267-
[class*="span"] {
267+
.row > [class*="span"] {
268268
display: inline;
269269
float: left;
270270
margin-left: 20px;
@@ -341,40 +341,40 @@ a:hover {
341341
.span24 {
342342
width: 1420px;
343343
}
344-
.offset1 {
344+
.row > .offset1 {
345345
margin-left: 80px;
346346
}
347-
.offset2 {
347+
.row > .offset2 {
348348
margin-left: 140px;
349349
}
350-
.offset3 {
350+
.row > .offset3 {
351351
margin-left: 200px;
352352
}
353-
.offset4 {
353+
.row > .offset4 {
354354
margin-left: 260px;
355355
}
356-
.offset5 {
356+
.row > .offset5 {
357357
margin-left: 320px;
358358
}
359-
.offset6 {
359+
.row > .offset6 {
360360
margin-left: 380px;
361361
}
362-
.offset7 {
362+
.row > .offset7 {
363363
margin-left: 440px;
364364
}
365-
.offset8 {
365+
.row > .offset8 {
366366
margin-left: 500px;
367367
}
368-
.offset9 {
368+
.row > .offset9 {
369369
margin-left: 560px;
370370
}
371-
.offset10 {
371+
.row > .offset10 {
372372
margin-left: 620px;
373373
}
374-
.offset11 {
374+
.row > .offset11 {
375375
margin-left: 680px;
376376
}
377-
.offset12 {
377+
.row > .offset12 {
378378
margin-left: 740px;
379379
}
380380
.span-one-third {
@@ -788,99 +788,67 @@ textarea.xxlarge {
788788
}
789789
input.span1, textarea.span1, select.span1 {
790790
display: inline-block;
791-
float: none;
792791
width: 30px;
793-
margin-left: 0;
794792
}
795793
input.span2, textarea.span2, select.span2 {
796794
display: inline-block;
797-
float: none;
798795
width: 90px;
799-
margin-left: 0;
800796
}
801797
input.span3, textarea.span3, select.span3 {
802798
display: inline-block;
803-
float: none;
804799
width: 150px;
805-
margin-left: 0;
806800
}
807801
input.span4, textarea.span4, select.span4 {
808802
display: inline-block;
809-
float: none;
810803
width: 210px;
811-
margin-left: 0;
812804
}
813805
input.span5, textarea.span5, select.span5 {
814806
display: inline-block;
815-
float: none;
816807
width: 270px;
817-
margin-left: 0;
818808
}
819809
input.span6, textarea.span6, select.span6 {
820810
display: inline-block;
821-
float: none;
822811
width: 330px;
823-
margin-left: 0;
824812
}
825813
input.span7, textarea.span7, select.span7 {
826814
display: inline-block;
827-
float: none;
828815
width: 390px;
829-
margin-left: 0;
830816
}
831817
input.span8, textarea.span8, select.span8 {
832818
display: inline-block;
833-
float: none;
834819
width: 450px;
835-
margin-left: 0;
836820
}
837821
input.span9, textarea.span9, select.span9 {
838822
display: inline-block;
839-
float: none;
840823
width: 510px;
841-
margin-left: 0;
842824
}
843825
input.span10, textarea.span10, select.span10 {
844826
display: inline-block;
845-
float: none;
846827
width: 570px;
847-
margin-left: 0;
848828
}
849829
input.span11, textarea.span11, select.span11 {
850830
display: inline-block;
851-
float: none;
852831
width: 630px;
853-
margin-left: 0;
854832
}
855833
input.span12, textarea.span12, select.span12 {
856834
display: inline-block;
857-
float: none;
858835
width: 690px;
859-
margin-left: 0;
860836
}
861837
input.span13, textarea.span13, select.span13 {
862838
display: inline-block;
863-
float: none;
864839
width: 750px;
865-
margin-left: 0;
866840
}
867841
input.span14, textarea.span14, select.span14 {
868842
display: inline-block;
869-
float: none;
870843
width: 810px;
871-
margin-left: 0;
872844
}
873845
input.span15, textarea.span15, select.span15 {
874846
display: inline-block;
875-
float: none;
876847
width: 870px;
877-
margin-left: 0;
878848
}
879849
input.span16, textarea.span16, select.span16 {
880850
display: inline-block;
881-
float: none;
882851
width: 930px;
883-
margin-left: 0;
884852
}
885853
input[disabled],
886854
select[disabled],
@@ -1134,6 +1102,54 @@ table tbody tr:last-child td:last-child {
11341102
-moz-border-radius: 0 0 4px 0;
11351103
border-radius: 0 0 4px 0;
11361104
}
1105+
table .span1 {
1106+
width: 20px;
1107+
}
1108+
table .span2 {
1109+
width: 60px;
1110+
}
1111+
table .span3 {
1112+
width: 100px;
1113+
}
1114+
table .span4 {
1115+
width: 140px;
1116+
}
1117+
table .span5 {
1118+
width: 180px;
1119+
}
1120+
table .span6 {
1121+
width: 220px;
1122+
}
1123+
table .span7 {
1124+
width: 260px;
1125+
}
1126+
table .span8 {
1127+
width: 300px;
1128+
}
1129+
table .span9 {
1130+
width: 340px;
1131+
}
1132+
table .span10 {
1133+
width: 380px;
1134+
}
1135+
table .span11 {
1136+
width: 420px;
1137+
}
1138+
table .span12 {
1139+
width: 460px;
1140+
}
1141+
table .span13 {
1142+
width: 500px;
1143+
}
1144+
table .span14 {
1145+
width: 540px;
1146+
}
1147+
table .span15 {
1148+
width: 580px;
1149+
}
1150+
table .span16 {
1151+
width: 620px;
1152+
}
11371153
.zebra-striped tbody tr:nth-child(odd) td {
11381154
background-color: #f9f9f9;
11391155
}
@@ -2342,7 +2358,7 @@ button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner {
23422358
.media-grid a {
23432359
float: left;
23442360
padding: 4px;
2345-
margin: 0 0 20px 20px;
2361+
margin: 0 0 18px 20px;
23462362
border: 1px solid #ddd;
23472363
-webkit-border-radius: 4px;
23482364
-moz-border-radius: 4px;

bootstrap.min.css

Lines changed: 46 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/forms.less

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,7 @@ textarea.xxlarge {
235235
// This is a duplication of the main grid .columns() mixin, but subtracts 10px to account for input padding and border
236236
.formColumns(@columnSpan: 1) {
237237
display: inline-block;
238-
float: none;
239238
width: ((@gridColumnWidth - 10) * @columnSpan) + ((@gridColumnWidth - 10) * (@columnSpan - 1));
240-
margin-left: 0;
241239
}
242240
input,
243241
textarea,

lib/patterns.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,7 @@ input[type=submit].btn {
981981
// -----------
982982

983983
.media-grid {
984-
margin-left: -20px;
984+
margin-left: -@gridGutterWidth;
985985
margin-bottom: 0;
986986
.clearfix();
987987
li {
@@ -990,7 +990,7 @@ input[type=submit].btn {
990990
a {
991991
float: left;
992992
padding: 4px;
993-
margin: 0 0 20px 20px;
993+
margin: 0 0 @baseline @gridGutterWidth;
994994
border: 1px solid #ddd;
995995
.border-radius(4px);
996996
.box-shadow(0 1px 1px rgba(0,0,0,.075));

0 commit comments

Comments
 (0)