1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-10-01 07:46:47 +02:00

overhaul the grid CSS to make it more durable for tables and forms to use the same sizing methods; need to see about improving this in the future

This commit is contained in:
Mark Otto
2011-10-03 22:14:50 -07:00
parent 948c59ddb3
commit a968d300b4
6 changed files with 154 additions and 94 deletions

View File

@@ -52,6 +52,34 @@ table {
}
// TABLE CELL SIZES
// ----------------
// This is a duplication of the main grid .columns() mixin, but subtracts 20px to account for input padding and border
.tableColumns(@columnSpan: 1) {
width: ((@gridColumnWidth - 20) * @columnSpan) + ((@gridColumnWidth - 20) * (@columnSpan - 1));
}
table {
// Default columns
.span1 { .tableColumns(1); }
.span2 { .tableColumns(2); }
.span3 { .tableColumns(3); }
.span4 { .tableColumns(4); }
.span5 { .tableColumns(5); }
.span6 { .tableColumns(6); }
.span7 { .tableColumns(7); }
.span8 { .tableColumns(8); }
.span9 { .tableColumns(9); }
.span10 { .tableColumns(10); }
.span11 { .tableColumns(11); }
.span12 { .tableColumns(12); }
.span13 { .tableColumns(13); }
.span14 { .tableColumns(14); }
.span15 { .tableColumns(15); }
.span16 { .tableColumns(16); }
}
// ZEBRA-STRIPING
// --------------