2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-05 16:42:29 +03:00

redefine the grid to use attribute selectors with css regex, make previously fixed grid values use variables we use elsewhere

This commit is contained in:
Mark Otto
2011-08-27 15:30:18 -07:00
parent b552281558
commit 650251228b
6 changed files with 41 additions and 43 deletions
+1 -1
View File
@@ -434,7 +434,7 @@ footer {
}
&:active {
@shadow: inset 0 3px 7px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.05);
@shadow: inset 0 2px 4px rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.05);
.box-shadow(@shadow);
}
+1 -1
View File
@@ -36,7 +36,7 @@
@gridColumns: 16;
@gridColumnWidth: 40px;
@gridGutterWidth: 20px;
@extraSpace: 40px;
@extraSpace: (@gridGutterWidth * 2); // For our grid calculations
@siteWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));
// Color Scheme
+11 -19
View File
@@ -9,28 +9,14 @@
.row {
.clearfix();
margin-left: -20px;
margin-left: -1 * @gridGutterWidth;
// Default columns
.span1,
.span2,
.span3,
.span4,
.span5,
.span6,
.span7,
.span8,
.span9,
.span10,
.span11,
.span12,
.span13,
.span14,
.span15,
.span16 {
// Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7)
// Credit to @dhg for the idea
[class^="span"] {
display: inline;
float: left;
margin-left: 20px;
margin-left: @gridGutterWidth;
}
// Default columns
@@ -64,6 +50,12 @@
.offset10 { .offset(10); }
.offset11 { .offset(11); }
.offset12 { .offset(12); }
// Unique column sizes for 16-column grid
.span-one-third { width: 300px; }
.span-two-thirds { width: 620px; }
.offset-one-third { margin-left: 320px; }
.offset-two-thirds { margin-left: 640px; }
}