aboutsummaryrefslogtreecommitdiff
path: root/less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2012-09-10 10:11:02 -0700
committerMark Otto <[email protected]>2012-09-10 10:11:02 -0700
commit7110b243f5c88274742477c80c2d08be3f259566 (patch)
tree9ad18a3bd134a9c69e524c6cbbcb8bdd0c5f3d61 /less
parentdd1bce2611a83365c0b2fd14b14512180ec09ec1 (diff)
downloadbootstrap-7110b243f5c88274742477c80c2d08be3f259566.tar.xz
bootstrap-7110b243f5c88274742477c80c2d08be3f259566.zip
more tests and experiments
Diffstat (limited to 'less')
-rw-r--r--less/mixins.less14
-rw-r--r--less/tests/grid.html12
2 files changed, 23 insertions, 3 deletions
diff --git a/less/mixins.less b/less/mixins.less
index 803837e2d..bfce2c9c2 100644
--- a/less/mixins.less
+++ b/less/mixins.less
@@ -609,11 +609,23 @@
.spanX (0) {}
.span(@columns) {
- width: percentage(@columns / @gridColumns) - percentage(@gridGutterWidth / @gridRowWidth);
+ //width: percentage(@columns / @gridColumns) - percentage(@gridGutterWidth / @gridRowWidth) + percentage(@gridGutterWidth/(@columns - 1));
+ //width: (100% - ((@columns - 1) * (@gridGutterWidth / @gridRowWidth))) / @gridColumns;
+
+
+ //width: percentage((@columns * (((@columns - 1) * (@gridGutterWidth/@gridRowWidth)))) / @gridRowWidth);
+ width: percentage((@columns * (@gridRowWidth - ( @columns - 1 ) * (@gridGutterWidth/@gridRowWidth)) / 12 ) / @gridRowWidth);
+ //( 4 * (940 - (num_col - 1 )*(20/940)) )/940
+
margin-left: percentage((@gridGutterWidth / 2) / @gridRowWidth);
+ //margin-left: percentage((((@columns - 1) * @gridGutterWidth)/ @gridRowWidth ) / (2 * (@columns - 1) );
+
margin-right: percentage((@gridGutterWidth / 2) / @gridRowWidth);
+ //margin-right: percentage((((@columns - 1) * @gridGutterWidth)/ @gridRowWidth ) / (2 * (@columns - 1) );
}
+ // 940*4/12 - 20/940 = .312056737
+
// Space grid-sized controls properly if multiple per line
input[class*="span"]:first-child,
textarea[class*="span"]:first-child,
diff --git a/less/tests/grid.html b/less/tests/grid.html
index abfd5fbb2..a8832c40a 100644
--- a/less/tests/grid.html
+++ b/less/tests/grid.html
@@ -17,7 +17,9 @@
padding-bottom: 30px;
}
-
+ .container {
+ background-color: rgba(255,0,0,.1);
+ }
</style>
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
@@ -75,7 +77,7 @@
<h2>Inputs</h2>
- <input type="text" class="span1" placeholder=".span1">
+<!-- <input type="text" class="span1" placeholder=".span1">
<input type="text" class="span2" placeholder=".span2">
<input type="text" class="span4" placeholder=".span4">
<input type="text" class="span5" placeholder=".span5">
@@ -93,6 +95,12 @@
<input type="text" class="span4" placeholder=".span4">
<input type="text" class="span5" placeholder=".span5">
</div>
+ -->
+ <div class="controls-row">
+ <input type="text" class="span4" placeholder=".span4">
+ <input type="text" class="span4" placeholder=".span4">
+ <input type="text" class="span4" placeholder=".span4">
+ </div>
</form> <!-- /container -->