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

new approach to grid with recursive mixins :D

This commit is contained in:
Jacob Thornton 2012-03-04 14:06:30 -08:00
parent 8615987243
commit 1aeca545c8
4 changed files with 447 additions and 655 deletions

Binary file not shown.

View file

@ -184,77 +184,77 @@
.navbar-fixed-bottom .container {
width: 724px;
}
.span1 {
width: 42px;
}
.span2 {
width: 104px;
}
.span3 {
width: 166px;
}
.span4 {
width: 228px;
}
.span5 {
width: 290px;
}
.span6 {
width: 352px;
}
.span7 {
width: 414px;
}
.span8 {
width: 476px;
}
.span9 {
width: 538px;
}
.span10 {
width: 600px;
.span12 {
width: 724px;
}
.span11 {
width: 662px;
}
.span12 {
width: 724px;
.span10 {
width: 600px;
}
.offset1 {
margin-left: 82px;
.span9 {
width: 538px;
}
.offset2 {
margin-left: 144px;
.span8 {
width: 476px;
}
.offset3 {
margin-left: 206px;
.span7 {
width: 414px;
}
.offset4 {
margin-left: 268px;
.span6 {
width: 352px;
}
.offset5 {
margin-left: 330px;
.span5 {
width: 290px;
}
.offset6 {
margin-left: 392px;
.span4 {
width: 228px;
}
.offset7 {
margin-left: 454px;
.span3 {
width: 166px;
}
.offset8 {
margin-left: 516px;
.span2 {
width: 104px;
}
.offset9 {
margin-left: 578px;
.span1 {
width: 42px;
}
.offset10 {
margin-left: 640px;
.offset12 {
margin-left: 764px;
}
.offset11 {
margin-left: 702px;
}
.offset12 {
margin-left: 764px;
.offset10 {
margin-left: 640px;
}
.offset9 {
margin-left: 578px;
}
.offset8 {
margin-left: 516px;
}
.offset7 {
margin-left: 454px;
}
.offset6 {
margin-left: 392px;
}
.offset5 {
margin-left: 330px;
}
.offset4 {
margin-left: 268px;
}
.offset3 {
margin-left: 206px;
}
.offset2 {
margin-left: 144px;
}
.offset1 {
margin-left: 82px;
}
.row-fluid {
width: 100%;
@ -275,107 +275,107 @@
.row-fluid > [class*="span"]:first-child {
margin-left: 0;
}
.row-fluid > .span1 {
width: 5.801104972%;
}
.row-fluid > .span2 {
width: 14.364640883%;
}
.row-fluid > .span3 {
width: 22.928176794%;
}
.row-fluid > .span4 {
width: 31.491712705%;
}
.row-fluid > .span5 {
width: 40.055248616%;
}
.row-fluid > .span6 {
width: 48.618784527%;
}
.row-fluid > .span7 {
width: 57.182320438000005%;
}
.row-fluid > .span8 {
width: 65.74585634900001%;
}
.row-fluid > .span9 {
width: 74.30939226%;
}
.row-fluid > .span10 {
width: 82.87292817100001%;
}
.row-fluid > .span11 {
width: 91.436464082%;
}
.row-fluid > .span12 {
width: 99.999999993%;
}
.row-fluid .span11 {
width: 91.436464082%;
}
.row-fluid .span10 {
width: 82.87292817100001%;
}
.row-fluid .span9 {
width: 74.30939226%;
}
.row-fluid .span8 {
width: 65.74585634900001%;
}
.row-fluid .span7 {
width: 57.182320438000005%;
}
.row-fluid .span6 {
width: 48.618784527%;
}
.row-fluid .span5 {
width: 40.055248616%;
}
.row-fluid .span4 {
width: 31.491712705%;
}
.row-fluid .span3 {
width: 22.928176794%;
}
.row-fluid .span2 {
width: 14.364640883%;
}
.row-fluid .span1 {
width: 5.801104972%;
}
input,
textarea,
.uneditable-input {
margin-left: 0;
}
input > .span1,
textarea > .span1,
.uneditable-input > .span1 {
width: 32px;
}
input > .span2,
textarea > .span2,
.uneditable-input > .span2 {
width: 94px;
}
input > .span3,
textarea > .span3,
.uneditable-input > .span3 {
width: 156px;
}
input > .span4,
textarea > .span4,
.uneditable-input > .span4 {
width: 218px;
}
input > .span5,
textarea > .span5,
.uneditable-input > .span5 {
width: 280px;
}
input > .span6,
textarea > .span6,
.uneditable-input > .span6 {
width: 342px;
}
input > .span7,
textarea > .span7,
.uneditable-input > .span7 {
width: 404px;
}
input > .span8,
textarea > .span8,
.uneditable-input > .span8 {
width: 466px;
}
input > .span9,
textarea > .span9,
.uneditable-input > .span9 {
width: 528px;
}
input > .span10,
textarea > .span10,
.uneditable-input > .span10 {
width: 590px;
}
input > .span11,
textarea > .span11,
.uneditable-input > .span11 {
width: 652px;
}
input > .span12,
textarea > .span12,
.uneditable-input > .span12 {
width: 714px;
}
input .span11,
textarea .span11,
.uneditable-input .span11 {
width: 652px;
}
input .span10,
textarea .span10,
.uneditable-input .span10 {
width: 590px;
}
input .span9,
textarea .span9,
.uneditable-input .span9 {
width: 528px;
}
input .span8,
textarea .span8,
.uneditable-input .span8 {
width: 466px;
}
input .span7,
textarea .span7,
.uneditable-input .span7 {
width: 404px;
}
input .span6,
textarea .span6,
.uneditable-input .span6 {
width: 342px;
}
input .span5,
textarea .span5,
.uneditable-input .span5 {
width: 280px;
}
input .span4,
textarea .span4,
.uneditable-input .span4 {
width: 218px;
}
input .span3,
textarea .span3,
.uneditable-input .span3 {
width: 156px;
}
input .span2,
textarea .span2,
.uneditable-input .span2 {
width: 94px;
}
input .span1,
textarea .span1,
.uneditable-input .span1 {
width: 32px;
}
}
@media (max-width: 979px) {
body {
@ -513,77 +513,77 @@
.navbar-fixed-bottom .container {
width: 1170px;
}
.span1 {
width: 70px;
}
.span2 {
width: 170px;
}
.span3 {
width: 270px;
}
.span4 {
width: 370px;
}
.span5 {
width: 470px;
}
.span6 {
width: 570px;
}
.span7 {
width: 670px;
}
.span8 {
width: 770px;
}
.span9 {
width: 870px;
}
.span10 {
width: 970px;
.span12 {
width: 1170px;
}
.span11 {
width: 1070px;
}
.span12 {
width: 1170px;
.span10 {
width: 970px;
}
.offset1 {
margin-left: 130px;
.span9 {
width: 870px;
}
.offset2 {
margin-left: 230px;
.span8 {
width: 770px;
}
.offset3 {
margin-left: 330px;
.span7 {
width: 670px;
}
.offset4 {
margin-left: 430px;
.span6 {
width: 570px;
}
.offset5 {
margin-left: 530px;
.span5 {
width: 470px;
}
.offset6 {
margin-left: 630px;
.span4 {
width: 370px;
}
.offset7 {
margin-left: 730px;
.span3 {
width: 270px;
}
.offset8 {
margin-left: 830px;
.span2 {
width: 170px;
}
.offset9 {
margin-left: 930px;
.span1 {
width: 70px;
}
.offset10 {
margin-left: 1030px;
.offset12 {
margin-left: 1230px;
}
.offset11 {
margin-left: 1130px;
}
.offset12 {
margin-left: 1230px;
.offset10 {
margin-left: 1030px;
}
.offset9 {
margin-left: 930px;
}
.offset8 {
margin-left: 830px;
}
.offset7 {
margin-left: 730px;
}
.offset6 {
margin-left: 630px;
}
.offset5 {
margin-left: 530px;
}
.offset4 {
margin-left: 430px;
}
.offset3 {
margin-left: 330px;
}
.offset2 {
margin-left: 230px;
}
.offset1 {
margin-left: 130px;
}
.row-fluid {
width: 100%;
@ -604,107 +604,107 @@
.row-fluid > [class*="span"]:first-child {
margin-left: 0;
}
.row-fluid > .span1 {
width: 5.982905983%;
}
.row-fluid > .span2 {
width: 14.529914530000001%;
}
.row-fluid > .span3 {
width: 23.076923077%;
}
.row-fluid > .span4 {
width: 31.623931624%;
}
.row-fluid > .span5 {
width: 40.170940171000005%;
}
.row-fluid > .span6 {
width: 48.717948718%;
}
.row-fluid > .span7 {
width: 57.264957265%;
}
.row-fluid > .span8 {
width: 65.81196581200001%;
}
.row-fluid > .span9 {
width: 74.358974359%;
}
.row-fluid > .span10 {
width: 82.905982906%;
}
.row-fluid > .span11 {
width: 91.45299145300001%;
}
.row-fluid > .span12 {
width: 100%;
}
.row-fluid .span11 {
width: 91.45299145300001%;
}
.row-fluid .span10 {
width: 82.905982906%;
}
.row-fluid .span9 {
width: 74.358974359%;
}
.row-fluid .span8 {
width: 65.81196581200001%;
}
.row-fluid .span7 {
width: 57.264957265%;
}
.row-fluid .span6 {
width: 48.717948718%;
}
.row-fluid .span5 {
width: 40.170940171000005%;
}
.row-fluid .span4 {
width: 31.623931624%;
}
.row-fluid .span3 {
width: 23.076923077%;
}
.row-fluid .span2 {
width: 14.529914530000001%;
}
.row-fluid .span1 {
width: 5.982905983%;
}
input,
textarea,
.uneditable-input {
margin-left: 0;
}
input > .span1,
textarea > .span1,
.uneditable-input > .span1 {
width: 60px;
}
input > .span2,
textarea > .span2,
.uneditable-input > .span2 {
width: 160px;
}
input > .span3,
textarea > .span3,
.uneditable-input > .span3 {
width: 260px;
}
input > .span4,
textarea > .span4,
.uneditable-input > .span4 {
width: 360px;
}
input > .span5,
textarea > .span5,
.uneditable-input > .span5 {
width: 460px;
}
input > .span6,
textarea > .span6,
.uneditable-input > .span6 {
width: 560px;
}
input > .span7,
textarea > .span7,
.uneditable-input > .span7 {
width: 660px;
}
input > .span8,
textarea > .span8,
.uneditable-input > .span8 {
width: 760px;
}
input > .span9,
textarea > .span9,
.uneditable-input > .span9 {
width: 860px;
}
input > .span10,
textarea > .span10,
.uneditable-input > .span10 {
width: 960px;
}
input > .span11,
textarea > .span11,
.uneditable-input > .span11 {
width: 1060px;
}
input > .span12,
textarea > .span12,
.uneditable-input > .span12 {
width: 1160px;
}
input .span11,
textarea .span11,
.uneditable-input .span11 {
width: 1060px;
}
input .span10,
textarea .span10,
.uneditable-input .span10 {
width: 960px;
}
input .span9,
textarea .span9,
.uneditable-input .span9 {
width: 860px;
}
input .span8,
textarea .span8,
.uneditable-input .span8 {
width: 760px;
}
input .span7,
textarea .span7,
.uneditable-input .span7 {
width: 660px;
}
input .span6,
textarea .span6,
.uneditable-input .span6 {
width: 560px;
}
input .span5,
textarea .span5,
.uneditable-input .span5 {
width: 460px;
}
input .span4,
textarea .span4,
.uneditable-input .span4 {
width: 360px;
}
input .span3,
textarea .span3,
.uneditable-input .span3 {
width: 260px;
}
input .span2,
textarea .span2,
.uneditable-input .span2 {
width: 160px;
}
input .span1,
textarea .span1,
.uneditable-input .span1 {
width: 60px;
}
.thumbnails {
margin-left: -30px;
}

View file

@ -148,77 +148,77 @@ a:hover {
.navbar-fixed-bottom .container {
width: 940px;
}
.span1 {
width: 60px;
}
.span2 {
width: 140px;
}
.span3 {
width: 220px;
}
.span4 {
width: 300px;
}
.span5 {
width: 380px;
}
.span6 {
width: 460px;
}
.span7 {
width: 540px;
}
.span8 {
width: 620px;
}
.span9 {
width: 700px;
}
.span10 {
width: 780px;
.span12 {
width: 940px;
}
.span11 {
width: 860px;
}
.span12 {
width: 940px;
.span10 {
width: 780px;
}
.offset1 {
margin-left: 100px;
.span9 {
width: 700px;
}
.offset2 {
margin-left: 180px;
.span8 {
width: 620px;
}
.offset3 {
margin-left: 260px;
.span7 {
width: 540px;
}
.offset4 {
margin-left: 340px;
.span6 {
width: 460px;
}
.offset5 {
margin-left: 420px;
.span5 {
width: 380px;
}
.offset6 {
margin-left: 500px;
.span4 {
width: 300px;
}
.offset7 {
margin-left: 580px;
.span3 {
width: 220px;
}
.offset8 {
margin-left: 660px;
.span2 {
width: 140px;
}
.offset9 {
margin-left: 740px;
.span1 {
width: 60px;
}
.offset10 {
margin-left: 820px;
.offset12 {
margin-left: 980px;
}
.offset11 {
margin-left: 900px;
}
.offset12 {
margin-left: 980px;
.offset10 {
margin-left: 820px;
}
.offset9 {
margin-left: 740px;
}
.offset8 {
margin-left: 660px;
}
.offset7 {
margin-left: 580px;
}
.offset6 {
margin-left: 500px;
}
.offset5 {
margin-left: 420px;
}
.offset4 {
margin-left: 340px;
}
.offset3 {
margin-left: 260px;
}
.offset2 {
margin-left: 180px;
}
.offset1 {
margin-left: 100px;
}
.row-fluid {
width: 100%;
@ -239,42 +239,42 @@ a:hover {
.row-fluid > [class*="span"]:first-child {
margin-left: 0;
}
.row-fluid > .span1 {
width: 6.382978723%;
}
.row-fluid > .span2 {
width: 14.89361702%;
}
.row-fluid > .span3 {
width: 23.404255317%;
}
.row-fluid > .span4 {
width: 31.914893614%;
}
.row-fluid > .span5 {
width: 40.425531911%;
}
.row-fluid > .span6 {
width: 48.93617020799999%;
}
.row-fluid > .span7 {
width: 57.446808505%;
}
.row-fluid > .span8 {
width: 65.95744680199999%;
}
.row-fluid > .span9 {
width: 74.468085099%;
}
.row-fluid > .span10 {
width: 82.97872339599999%;
}
.row-fluid > .span11 {
width: 91.489361693%;
}
.row-fluid > .span12 {
width: 99.99999998999999%;
}
.row-fluid .span11 {
width: 91.489361693%;
}
.row-fluid .span10 {
width: 82.97872339599999%;
}
.row-fluid .span9 {
width: 74.468085099%;
}
.row-fluid .span8 {
width: 65.95744680199999%;
}
.row-fluid .span7 {
width: 57.446808505%;
}
.row-fluid .span6 {
width: 48.93617020799999%;
}
.row-fluid .span5 {
width: 40.425531911%;
}
.row-fluid .span4 {
width: 31.914893614%;
}
.row-fluid .span3 {
width: 23.404255317%;
}
.row-fluid .span2 {
width: 14.89361702%;
}
.row-fluid .span1 {
width: 6.382978723%;
}
.container {
margin-left: auto;
margin-right: auto;
@ -767,66 +767,66 @@ textarea,
.uneditable-input {
margin-left: 0;
}
input > .span1,
textarea > .span1,
.uneditable-input > .span1 {
width: 50px;
}
input > .span2,
textarea > .span2,
.uneditable-input > .span2 {
width: 130px;
}
input > .span3,
textarea > .span3,
.uneditable-input > .span3 {
width: 210px;
}
input > .span4,
textarea > .span4,
.uneditable-input > .span4 {
width: 290px;
}
input > .span5,
textarea > .span5,
.uneditable-input > .span5 {
width: 370px;
}
input > .span6,
textarea > .span6,
.uneditable-input > .span6 {
width: 450px;
}
input > .span7,
textarea > .span7,
.uneditable-input > .span7 {
width: 530px;
}
input > .span8,
textarea > .span8,
.uneditable-input > .span8 {
width: 610px;
}
input > .span9,
textarea > .span9,
.uneditable-input > .span9 {
width: 690px;
}
input > .span10,
textarea > .span10,
.uneditable-input > .span10 {
width: 770px;
}
input > .span11,
textarea > .span11,
.uneditable-input > .span11 {
width: 850px;
}
input > .span12,
textarea > .span12,
.uneditable-input > .span12 {
width: 930px;
}
input .span11,
textarea .span11,
.uneditable-input .span11 {
width: 850px;
}
input .span10,
textarea .span10,
.uneditable-input .span10 {
width: 770px;
}
input .span9,
textarea .span9,
.uneditable-input .span9 {
width: 690px;
}
input .span8,
textarea .span8,
.uneditable-input .span8 {
width: 610px;
}
input .span7,
textarea .span7,
.uneditable-input .span7 {
width: 530px;
}
input .span6,
textarea .span6,
.uneditable-input .span6 {
width: 450px;
}
input .span5,
textarea .span5,
.uneditable-input .span5 {
width: 370px;
}
input .span4,
textarea .span4,
.uneditable-input .span4 {
width: 290px;
}
input .span3,
textarea .span3,
.uneditable-input .span3 {
width: 210px;
}
input .span2,
textarea .span2,
.uneditable-input .span2 {
width: 130px;
}
input .span1,
textarea .span1,
.uneditable-input .span1 {
width: 50px;
}
input[disabled],
select[disabled],
textarea[disabled],
@ -2880,7 +2880,7 @@ input[type="submit"].btn.btn-small {
.navbar-search .search-query :-moz-placeholder {
color: #eeeeee;
}
.navbar-search .search-query::-webkit-input-placeholder {
.navbar-search .search-query ::-webkit-input-placeholder {
color: #eeeeee;
}
.navbar-search .search-query:hover {

View file

@ -482,140 +482,24 @@
#grid {
// we have to define these bogus mixins otherwise
// 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, @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) {}
// Recursive mixins! <3
// Requires not yet released LESS ;)
.spanX (@index) when not (@index = 0) {
~".span@{index}" { .span(@index); }
#grid .spanX(@index - 1);
}
.spanX (@index, @child) when not (@index = 0) and (@child) {
~"> .span@{index}" { .span(@index); }
#grid .spanX(@index - 1);
}
.spanX (0) {}
// override mixins with guards
.span1 (@gridColumns) when (@gridColumns > 0) { .span1 { .span(1); } }
.span2 (@gridColumns) when (@gridColumns > 1) { .span2 { .span(2); } }
.span3 (@gridColumns) when (@gridColumns > 2) { .span3 { .span(3); } }
.span4 (@gridColumns) when (@gridColumns > 3) { .span4 { .span(4); } }
.span5 (@gridColumns) when (@gridColumns > 4) { .span5 { .span(5); } }
.span6 (@gridColumns) when (@gridColumns > 5) { .span6 { .span(6); } }
.span7 (@gridColumns) when (@gridColumns > 6) { .span7 { .span(7); } }
.span8 (@gridColumns) when (@gridColumns > 7) { .span8 { .span(8); } }
.span9 (@gridColumns) when (@gridColumns > 8) { .span9 { .span(9); } }
.span10 (@gridColumns) when (@gridColumns > 9) { .span10 { .span(10); } }
.span11 (@gridColumns) when (@gridColumns > 10) { .span11 { .span(11); } }
.span12 (@gridColumns) when (@gridColumns > 11) { .span12 { .span(12); } }
.span13 (@gridColumns) when (@gridColumns > 12) { .span13 { .span(13); } }
.span14 (@gridColumns) when (@gridColumns > 13) { .span14 { .span(14); } }
.span15 (@gridColumns) when (@gridColumns > 14) { .span15 { .span(15); } }
.span16 (@gridColumns) when (@gridColumns > 15) { .span16 { .span(16); } }
.span17 (@gridColumns) when (@gridColumns > 16) { .span17 { .span(17); } }
.span18 (@gridColumns) when (@gridColumns > 17) { .span18 { .span(18); } }
.span19 (@gridColumns) when (@gridColumns > 18) { .span19 { .span(19); } }
.span20 (@gridColumns) when (@gridColumns > 19) { .span20 { .span(20); } }
.span21 (@gridColumns) when (@gridColumns > 20) { .span21 { .span(21); } }
.span22 (@gridColumns) when (@gridColumns > 21) { .span22 { .span(22); } }
.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) {}
.offset2 (@gridColumns) {}
.offset3 (@gridColumns) {}
.offset4 (@gridColumns) {}
.offset5 (@gridColumns) {}
.offset6 (@gridColumns) {}
.offset7 (@gridColumns) {}
.offset8 (@gridColumns) {}
.offset9 (@gridColumns) {}
.offset10 (@gridColumns) {}
.offset11 (@gridColumns) {}
.offset12 (@gridColumns) {}
.offset13 (@gridColumns) {}
.offset14 (@gridColumns) {}
.offset15 (@gridColumns) {}
.offset16 (@gridColumns) {}
.offset17 (@gridColumns) {}
.offset18 (@gridColumns) {}
.offset19 (@gridColumns) {}
.offset20 (@gridColumns) {}
.offset21 (@gridColumns) {}
.offset22 (@gridColumns) {}
.offset23 (@gridColumns) {}
.offset24 (@gridColumns) {}
// override with guards
.offset1 (@gridColumns) when (@gridColumns > 0) { .offset1 { .offset(1); } }
.offset2 (@gridColumns) when (@gridColumns > 1) { .offset2 { .offset(2); } }
.offset3 (@gridColumns) when (@gridColumns > 2) { .offset3 { .offset(3); } }
.offset4 (@gridColumns) when (@gridColumns > 3) { .offset4 { .offset(4); } }
.offset5 (@gridColumns) when (@gridColumns > 4) { .offset5 { .offset(5); } }
.offset6 (@gridColumns) when (@gridColumns > 5) { .offset6 { .offset(6); } }
.offset7 (@gridColumns) when (@gridColumns > 6) { .offset7 { .offset(7); } }
.offset8 (@gridColumns) when (@gridColumns > 7) { .offset8 { .offset(8); } }
.offset9 (@gridColumns) when (@gridColumns > 8) { .offset9 { .offset(9); } }
.offset10 (@gridColumns) when (@gridColumns > 9) { .offset10 { .offset(10); } }
.offset11 (@gridColumns) when (@gridColumns > 10) { .offset11 { .offset(11); } }
.offset12 (@gridColumns) when (@gridColumns > 11) { .offset12 { .offset(12); } }
.offset13 (@gridColumns) when (@gridColumns > 12) { .offset13 { .offset(13); } }
.offset14 (@gridColumns) when (@gridColumns > 13) { .offset14 { .offset(14); } }
.offset15 (@gridColumns) when (@gridColumns > 14) { .offset15 { .offset(15); } }
.offset16 (@gridColumns) when (@gridColumns > 15) { .offset16 { .offset(16); } }
.offset17 (@gridColumns) when (@gridColumns > 16) { .offset17 { .offset(17); } }
.offset18 (@gridColumns) when (@gridColumns > 17) { .offset18 { .offset(18); } }
.offset19 (@gridColumns) when (@gridColumns > 18) { .offset19 { .offset(19); } }
.offset20 (@gridColumns) when (@gridColumns > 19) { .offset20 { .offset(20); } }
.offset21 (@gridColumns) when (@gridColumns > 20) { .offset21 { .offset(21); } }
.offset22 (@gridColumns) when (@gridColumns > 21) { .offset22 { .offset(22); } }
.offset23 (@gridColumns) when (@gridColumns > 22) { .offset23 { .offset(23); } }
.offset24 (@gridColumns) when (@gridColumns > 23) { .offset24 { .offset(24); } }
.offsetX (@index) when not (@index = 0) {
~".offset@{index}" { .offset(@index); }
#grid .offsetX(@index - 1);
}
.offsetX (0) {}
.core (@gridColumnWidth, @gridGutterWidth) {
@ -642,57 +526,9 @@
.navbar-fixed-top .container,
.navbar-fixed-bottom .container { .span(@gridColumns); }
// define up to max of 24 columns (default is 12)
#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);
// define up to max of 24 offsets (default is 12)
#grid .offset1(@gridColumns);
#grid .offset2(@gridColumns);
#grid .offset3(@gridColumns);
#grid .offset4(@gridColumns);
#grid .offset5(@gridColumns);
#grid .offset6(@gridColumns);
#grid .offset7(@gridColumns);
#grid .offset8(@gridColumns);
#grid .offset9(@gridColumns);
#grid .offset10(@gridColumns);
#grid .offset11(@gridColumns);
#grid .offset12(@gridColumns);
#grid .offset13(@gridColumns);
#grid .offset14(@gridColumns);
#grid .offset15(@gridColumns);
#grid .offset16(@gridColumns);
#grid .offset17(@gridColumns);
#grid .offset18(@gridColumns);
#grid .offset19(@gridColumns);
#grid .offset20(@gridColumns);
#grid .offset21(@gridColumns);
#grid .offset22(@gridColumns);
#grid .offset23(@gridColumns);
#grid .offset24(@gridColumns);
// generate .spanX and .offsetX
#grid .spanX (@gridColumns);
#grid .offsetX (@gridColumns);
}
@ -713,30 +549,8 @@
margin-left: 0;
}
#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);
// generate .spanX
#grid .spanX (@gridColumns, true);
}
}
@ -752,30 +566,8 @@
.uneditable-input {
margin-left: 0; // override margin-left from core grid system
#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);
// generate .spanX
#grid .spanX (@gridColumns, true);
}
}