1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00

add guard for child spans

This commit is contained in:
Jacob Thornton 2012-02-27 18:21:21 -08:00
parent ae3382d797
commit 8615987243
7 changed files with 241 additions and 216 deletions

View file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

View file

@ -275,40 +275,40 @@
.row-fluid > [class*="span"]:first-child {
margin-left: 0;
}
.row-fluid .span1 {
.row-fluid > .span1 {
width: 5.801104972%;
}
.row-fluid .span2 {
.row-fluid > .span2 {
width: 14.364640883%;
}
.row-fluid .span3 {
.row-fluid > .span3 {
width: 22.928176794%;
}
.row-fluid .span4 {
.row-fluid > .span4 {
width: 31.491712705%;
}
.row-fluid .span5 {
.row-fluid > .span5 {
width: 40.055248616%;
}
.row-fluid .span6 {
.row-fluid > .span6 {
width: 48.618784527%;
}
.row-fluid .span7 {
.row-fluid > .span7 {
width: 57.182320438000005%;
}
.row-fluid .span8 {
.row-fluid > .span8 {
width: 65.74585634900001%;
}
.row-fluid .span9 {
.row-fluid > .span9 {
width: 74.30939226%;
}
.row-fluid .span10 {
.row-fluid > .span10 {
width: 82.87292817100001%;
}
.row-fluid .span11 {
.row-fluid > .span11 {
width: 91.436464082%;
}
.row-fluid .span12 {
.row-fluid > .span12 {
width: 99.999999993%;
}
input,
@ -316,64 +316,64 @@
.uneditable-input {
margin-left: 0;
}
input .span1,
textarea .span1,
.uneditable-input .span1 {
input > .span1,
textarea > .span1,
.uneditable-input > .span1 {
width: 32px;
}
input .span2,
textarea .span2,
.uneditable-input .span2 {
input > .span2,
textarea > .span2,
.uneditable-input > .span2 {
width: 94px;
}
input .span3,
textarea .span3,
.uneditable-input .span3 {
input > .span3,
textarea > .span3,
.uneditable-input > .span3 {
width: 156px;
}
input .span4,
textarea .span4,
.uneditable-input .span4 {
input > .span4,
textarea > .span4,
.uneditable-input > .span4 {
width: 218px;
}
input .span5,
textarea .span5,
.uneditable-input .span5 {
input > .span5,
textarea > .span5,
.uneditable-input > .span5 {
width: 280px;
}
input .span6,
textarea .span6,
.uneditable-input .span6 {
input > .span6,
textarea > .span6,
.uneditable-input > .span6 {
width: 342px;
}
input .span7,
textarea .span7,
.uneditable-input .span7 {
input > .span7,
textarea > .span7,
.uneditable-input > .span7 {
width: 404px;
}
input .span8,
textarea .span8,
.uneditable-input .span8 {
input > .span8,
textarea > .span8,
.uneditable-input > .span8 {
width: 466px;
}
input .span9,
textarea .span9,
.uneditable-input .span9 {
input > .span9,
textarea > .span9,
.uneditable-input > .span9 {
width: 528px;
}
input .span10,
textarea .span10,
.uneditable-input .span10 {
input > .span10,
textarea > .span10,
.uneditable-input > .span10 {
width: 590px;
}
input .span11,
textarea .span11,
.uneditable-input .span11 {
input > .span11,
textarea > .span11,
.uneditable-input > .span11 {
width: 652px;
}
input .span12,
textarea .span12,
.uneditable-input .span12 {
input > .span12,
textarea > .span12,
.uneditable-input > .span12 {
width: 714px;
}
}
@ -604,40 +604,40 @@
.row-fluid > [class*="span"]:first-child {
margin-left: 0;
}
.row-fluid .span1 {
.row-fluid > .span1 {
width: 5.982905983%;
}
.row-fluid .span2 {
.row-fluid > .span2 {
width: 14.529914530000001%;
}
.row-fluid .span3 {
.row-fluid > .span3 {
width: 23.076923077%;
}
.row-fluid .span4 {
.row-fluid > .span4 {
width: 31.623931624%;
}
.row-fluid .span5 {
.row-fluid > .span5 {
width: 40.170940171000005%;
}
.row-fluid .span6 {
.row-fluid > .span6 {
width: 48.717948718%;
}
.row-fluid .span7 {
.row-fluid > .span7 {
width: 57.264957265%;
}
.row-fluid .span8 {
.row-fluid > .span8 {
width: 65.81196581200001%;
}
.row-fluid .span9 {
.row-fluid > .span9 {
width: 74.358974359%;
}
.row-fluid .span10 {
.row-fluid > .span10 {
width: 82.905982906%;
}
.row-fluid .span11 {
.row-fluid > .span11 {
width: 91.45299145300001%;
}
.row-fluid .span12 {
.row-fluid > .span12 {
width: 100%;
}
input,
@ -645,64 +645,64 @@
.uneditable-input {
margin-left: 0;
}
input .span1,
textarea .span1,
.uneditable-input .span1 {
input > .span1,
textarea > .span1,
.uneditable-input > .span1 {
width: 60px;
}
input .span2,
textarea .span2,
.uneditable-input .span2 {
input > .span2,
textarea > .span2,
.uneditable-input > .span2 {
width: 160px;
}
input .span3,
textarea .span3,
.uneditable-input .span3 {
input > .span3,
textarea > .span3,
.uneditable-input > .span3 {
width: 260px;
}
input .span4,
textarea .span4,
.uneditable-input .span4 {
input > .span4,
textarea > .span4,
.uneditable-input > .span4 {
width: 360px;
}
input .span5,
textarea .span5,
.uneditable-input .span5 {
input > .span5,
textarea > .span5,
.uneditable-input > .span5 {
width: 460px;
}
input .span6,
textarea .span6,
.uneditable-input .span6 {
input > .span6,
textarea > .span6,
.uneditable-input > .span6 {
width: 560px;
}
input .span7,
textarea .span7,
.uneditable-input .span7 {
input > .span7,
textarea > .span7,
.uneditable-input > .span7 {
width: 660px;
}
input .span8,
textarea .span8,
.uneditable-input .span8 {
input > .span8,
textarea > .span8,
.uneditable-input > .span8 {
width: 760px;
}
input .span9,
textarea .span9,
.uneditable-input .span9 {
input > .span9,
textarea > .span9,
.uneditable-input > .span9 {
width: 860px;
}
input .span10,
textarea .span10,
.uneditable-input .span10 {
input > .span10,
textarea > .span10,
.uneditable-input > .span10 {
width: 960px;
}
input .span11,
textarea .span11,
.uneditable-input .span11 {
input > .span11,
textarea > .span11,
.uneditable-input > .span11 {
width: 1060px;
}
input .span12,
textarea .span12,
.uneditable-input .span12 {
input > .span12,
textarea > .span12,
.uneditable-input > .span12 {
width: 1160px;
}
.thumbnails {

View file

@ -239,40 +239,40 @@ a:hover {
.row-fluid > [class*="span"]:first-child {
margin-left: 0;
}
.row-fluid .span1 {
.row-fluid > .span1 {
width: 6.382978723%;
}
.row-fluid .span2 {
.row-fluid > .span2 {
width: 14.89361702%;
}
.row-fluid .span3 {
.row-fluid > .span3 {
width: 23.404255317%;
}
.row-fluid .span4 {
.row-fluid > .span4 {
width: 31.914893614%;
}
.row-fluid .span5 {
.row-fluid > .span5 {
width: 40.425531911%;
}
.row-fluid .span6 {
.row-fluid > .span6 {
width: 48.93617020799999%;
}
.row-fluid .span7 {
.row-fluid > .span7 {
width: 57.446808505%;
}
.row-fluid .span8 {
.row-fluid > .span8 {
width: 65.95744680199999%;
}
.row-fluid .span9 {
.row-fluid > .span9 {
width: 74.468085099%;
}
.row-fluid .span10 {
.row-fluid > .span10 {
width: 82.97872339599999%;
}
.row-fluid .span11 {
.row-fluid > .span11 {
width: 91.489361693%;
}
.row-fluid .span12 {
.row-fluid > .span12 {
width: 99.99999998999999%;
}
.container {
@ -767,64 +767,64 @@ textarea,
.uneditable-input {
margin-left: 0;
}
input .span1,
textarea .span1,
.uneditable-input .span1 {
input > .span1,
textarea > .span1,
.uneditable-input > .span1 {
width: 50px;
}
input .span2,
textarea .span2,
.uneditable-input .span2 {
input > .span2,
textarea > .span2,
.uneditable-input > .span2 {
width: 130px;
}
input .span3,
textarea .span3,
.uneditable-input .span3 {
input > .span3,
textarea > .span3,
.uneditable-input > .span3 {
width: 210px;
}
input .span4,
textarea .span4,
.uneditable-input .span4 {
input > .span4,
textarea > .span4,
.uneditable-input > .span4 {
width: 290px;
}
input .span5,
textarea .span5,
.uneditable-input .span5 {
input > .span5,
textarea > .span5,
.uneditable-input > .span5 {
width: 370px;
}
input .span6,
textarea .span6,
.uneditable-input .span6 {
input > .span6,
textarea > .span6,
.uneditable-input > .span6 {
width: 450px;
}
input .span7,
textarea .span7,
.uneditable-input .span7 {
input > .span7,
textarea > .span7,
.uneditable-input > .span7 {
width: 530px;
}
input .span8,
textarea .span8,
.uneditable-input .span8 {
input > .span8,
textarea > .span8,
.uneditable-input > .span8 {
width: 610px;
}
input .span9,
textarea .span9,
.uneditable-input .span9 {
input > .span9,
textarea > .span9,
.uneditable-input > .span9 {
width: 690px;
}
input .span10,
textarea .span10,
.uneditable-input .span10 {
input > .span10,
textarea > .span10,
.uneditable-input > .span10 {
width: 770px;
}
input .span11,
textarea .span11,
.uneditable-input .span11 {
input > .span11,
textarea > .span11,
.uneditable-input > .span11 {
width: 850px;
}
input .span12,
textarea .span12,
.uneditable-input .span12 {
input > .span12,
textarea > .span12,
.uneditable-input > .span12 {
width: 930px;
}
input[disabled],

View file

@ -486,30 +486,30 @@
// less throws an exception when we call for them
// below and a guard hasn't overridden them
// (@fat will work with @cloudhead on coming up with something better hopefully)
.span1 (@gridColumns) {}
.span2 (@gridColumns) {}
.span3 (@gridColumns) {}
.span4 (@gridColumns) {}
.span5 (@gridColumns) {}
.span6 (@gridColumns) {}
.span7 (@gridColumns) {}
.span8 (@gridColumns) {}
.span9 (@gridColumns) {}
.span10 (@gridColumns) {}
.span11 (@gridColumns) {}
.span12 (@gridColumns) {}
.span13 (@gridColumns) {}
.span14 (@gridColumns) {}
.span15 (@gridColumns) {}
.span16 (@gridColumns) {}
.span17 (@gridColumns) {}
.span18 (@gridColumns) {}
.span19 (@gridColumns) {}
.span20 (@gridColumns) {}
.span21 (@gridColumns) {}
.span22 (@gridColumns) {}
.span23 (@gridColumns) {}
.span24 (@gridColumns) {}
.span1 (@gridColumns, @child: 0) {}
.span2 (@gridColumns, @child: 0) {}
.span3 (@gridColumns, @child: 0) {}
.span4 (@gridColumns, @child: 0) {}
.span5 (@gridColumns, @child: 0) {}
.span6 (@gridColumns, @child: 0) {}
.span7 (@gridColumns, @child: 0) {}
.span8 (@gridColumns, @child: 0) {}
.span9 (@gridColumns, @child: 0) {}
.span10 (@gridColumns, @child: 0) {}
.span11 (@gridColumns, @child: 0) {}
.span12 (@gridColumns, @child: 0) {}
.span13 (@gridColumns, @child: 0) {}
.span14 (@gridColumns, @child: 0) {}
.span15 (@gridColumns, @child: 0) {}
.span16 (@gridColumns, @child: 0) {}
.span17 (@gridColumns, @child: 0) {}
.span18 (@gridColumns, @child: 0) {}
.span19 (@gridColumns, @child: 0) {}
.span20 (@gridColumns, @child: 0) {}
.span21 (@gridColumns, @child: 0) {}
.span22 (@gridColumns, @child: 0) {}
.span23 (@gridColumns, @child: 0) {}
.span24 (@gridColumns, @child: 0) {}
// override mixins with guards
@ -538,6 +538,31 @@
.span23 (@gridColumns) when (@gridColumns > 22) { .span23 { .span(23); } }
.span24 (@gridColumns) when (@gridColumns > 23) { .span24 { .span(24); } }
.span1 (@gridColumns, @child) when (@gridColumns > 0) and (@child) { > .span1 { .span(1); } }
.span2 (@gridColumns, @child) when (@gridColumns > 1) and (@child) { > .span2 { .span(2); } }
.span3 (@gridColumns, @child) when (@gridColumns > 2) and (@child) { > .span3 { .span(3); } }
.span4 (@gridColumns, @child) when (@gridColumns > 3) and (@child) { > .span4 { .span(4); } }
.span5 (@gridColumns, @child) when (@gridColumns > 4) and (@child) { > .span5 { .span(5); } }
.span6 (@gridColumns, @child) when (@gridColumns > 5) and (@child) { > .span6 { .span(6); } }
.span7 (@gridColumns, @child) when (@gridColumns > 6) and (@child) { > .span7 { .span(7); } }
.span8 (@gridColumns, @child) when (@gridColumns > 7) and (@child) { > .span8 { .span(8); } }
.span9 (@gridColumns, @child) when (@gridColumns > 8) and (@child) { > .span9 { .span(9); } }
.span10 (@gridColumns, @child) when (@gridColumns > 9) and (@child) { > .span10 { .span(10); } }
.span11 (@gridColumns, @child) when (@gridColumns > 10) and (@child) { > .span11 { .span(11); } }
.span12 (@gridColumns, @child) when (@gridColumns > 11) and (@child) { > .span12 { .span(12); } }
.span13 (@gridColumns, @child) when (@gridColumns > 12) and (@child) { > .span13 { .span(13); } }
.span14 (@gridColumns, @child) when (@gridColumns > 13) and (@child) { > .span14 { .span(14); } }
.span15 (@gridColumns, @child) when (@gridColumns > 14) and (@child) { > .span15 { .span(15); } }
.span16 (@gridColumns, @child) when (@gridColumns > 15) and (@child) { > .span16 { .span(16); } }
.span17 (@gridColumns, @child) when (@gridColumns > 16) and (@child) { > .span17 { .span(17); } }
.span18 (@gridColumns, @child) when (@gridColumns > 17) and (@child) { > .span18 { .span(18); } }
.span19 (@gridColumns, @child) when (@gridColumns > 18) and (@child) { > .span19 { .span(19); } }
.span20 (@gridColumns, @child) when (@gridColumns > 19) and (@child) { > .span20 { .span(20); } }
.span21 (@gridColumns, @child) when (@gridColumns > 20) and (@child) { > .span21 { .span(21); } }
.span22 (@gridColumns, @child) when (@gridColumns > 21) and (@child) { > .span22 { .span(22); } }
.span23 (@gridColumns, @child) when (@gridColumns > 22) and (@child) { > .span23 { .span(23); } }
.span24 (@gridColumns, @child) when (@gridColumns > 23) and (@child) { > .span24 { .span(24); } }
// do the same with offset as we did with spans ;_;
.offset1 (@gridColumns) {}
@ -688,30 +713,30 @@
margin-left: 0;
}
#grid .span1(@gridColumns);
#grid .span2(@gridColumns);
#grid .span3(@gridColumns);
#grid .span4(@gridColumns);
#grid .span5(@gridColumns);
#grid .span6(@gridColumns);
#grid .span7(@gridColumns);
#grid .span8(@gridColumns);
#grid .span9(@gridColumns);
#grid .span10(@gridColumns);
#grid .span11(@gridColumns);
#grid .span12(@gridColumns);
#grid .span13(@gridColumns);
#grid .span14(@gridColumns);
#grid .span15(@gridColumns);
#grid .span16(@gridColumns);
#grid .span17(@gridColumns);
#grid .span18(@gridColumns);
#grid .span19(@gridColumns);
#grid .span20(@gridColumns);
#grid .span21(@gridColumns);
#grid .span22(@gridColumns);
#grid .span23(@gridColumns);
#grid .span24(@gridColumns);
#grid .span1(@gridColumns, true);
#grid .span2(@gridColumns, true);
#grid .span3(@gridColumns, true);
#grid .span4(@gridColumns, true);
#grid .span5(@gridColumns, true);
#grid .span6(@gridColumns, true);
#grid .span7(@gridColumns, true);
#grid .span8(@gridColumns, true);
#grid .span9(@gridColumns, true);
#grid .span10(@gridColumns, true);
#grid .span11(@gridColumns, true);
#grid .span12(@gridColumns, true);
#grid .span13(@gridColumns, true);
#grid .span14(@gridColumns, true);
#grid .span15(@gridColumns, true);
#grid .span16(@gridColumns, true);
#grid .span17(@gridColumns, true);
#grid .span18(@gridColumns, true);
#grid .span19(@gridColumns, true);
#grid .span20(@gridColumns, true);
#grid .span21(@gridColumns, true);
#grid .span22(@gridColumns, true);
#grid .span23(@gridColumns, true);
#grid .span24(@gridColumns, true);
}
}
@ -727,30 +752,30 @@
.uneditable-input {
margin-left: 0; // override margin-left from core grid system
#grid .span1(@gridColumns);
#grid .span2(@gridColumns);
#grid .span3(@gridColumns);
#grid .span4(@gridColumns);
#grid .span5(@gridColumns);
#grid .span6(@gridColumns);
#grid .span7(@gridColumns);
#grid .span8(@gridColumns);
#grid .span9(@gridColumns);
#grid .span10(@gridColumns);
#grid .span11(@gridColumns);
#grid .span12(@gridColumns);
#grid .span13(@gridColumns);
#grid .span14(@gridColumns);
#grid .span15(@gridColumns);
#grid .span16(@gridColumns);
#grid .span17(@gridColumns);
#grid .span18(@gridColumns);
#grid .span19(@gridColumns);
#grid .span20(@gridColumns);
#grid .span21(@gridColumns);
#grid .span22(@gridColumns);
#grid .span23(@gridColumns);
#grid .span24(@gridColumns);
#grid .span1(@gridColumns, true);
#grid .span2(@gridColumns, true);
#grid .span3(@gridColumns, true);
#grid .span4(@gridColumns, true);
#grid .span5(@gridColumns, true);
#grid .span6(@gridColumns, true);
#grid .span7(@gridColumns, true);
#grid .span8(@gridColumns, true);
#grid .span9(@gridColumns, true);
#grid .span10(@gridColumns, true);
#grid .span11(@gridColumns, true);
#grid .span12(@gridColumns, true);
#grid .span13(@gridColumns, true);
#grid .span14(@gridColumns, true);
#grid .span15(@gridColumns, true);
#grid .span16(@gridColumns, true);
#grid .span17(@gridColumns, true);
#grid .span18(@gridColumns, true);
#grid .span19(@gridColumns, true);
#grid .span20(@gridColumns, true);
#grid .span21(@gridColumns, true);
#grid .span22(@gridColumns, true);
#grid .span23(@gridColumns, true);
#grid .span24(@gridColumns, true);
}
}