mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-08 17:22:31 +03:00
optimized grid system from @necolas
This commit is contained in:
+2
-12
@@ -36,6 +36,7 @@
|
||||
@gridColumns: 16;
|
||||
@gridColumnWidth: 40px;
|
||||
@gridGutterWidth: 20px;
|
||||
@extraSpace: 40px;
|
||||
@siteWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));
|
||||
|
||||
// Color Scheme
|
||||
@@ -125,21 +126,10 @@
|
||||
.clearfix();
|
||||
}
|
||||
.columns(@columnSpan: 1) {
|
||||
float: left;
|
||||
width: (@gridColumnWidth * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1));
|
||||
margin-left: @gridGutterWidth;
|
||||
&:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
.offsetMath(@extraSpace: 40px) {
|
||||
margin-left: (@gridColumnWidth * @columnOffset) + (@gridGutterWidth * (@columnOffset - 1)) + @extraSpace !important;
|
||||
}
|
||||
.offset(@columnOffset: 1) {
|
||||
.offsetMath(40px);
|
||||
&:first-child {
|
||||
.offsetMath(20px);
|
||||
}
|
||||
margin-left: (@gridColumnWidth * @columnOffset) + (@gridGutterWidth * (@columnOffset - 1)) + @extraSpace;
|
||||
}
|
||||
|
||||
// Border Radius
|
||||
|
||||
Reference in New Issue
Block a user