diff options
| author | Mark Otto <[email protected]> | 2013-03-26 17:12:17 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2013-03-26 17:12:17 -0700 |
| commit | ca31f060a839b957ce3a85d3eaaaae09a78bbeb0 (patch) | |
| tree | f35126669b4914142d6df703633a95e504049811 /less | |
| parent | 1e9be3644c51ec6b808728169a4d535062be2c5f (diff) | |
| download | bootstrap-ca31f060a839b957ce3a85d3eaaaae09a78bbeb0.tar.xz bootstrap-ca31f060a839b957ce3a85d3eaaaae09a78bbeb0.zip | |
New grid classes
Diffstat (limited to 'less')
| -rw-r--r-- | less/grid.less | 6 | ||||
| -rw-r--r-- | less/mixins.less | 48 | ||||
| -rw-r--r-- | less/scaffolding.less | 10 | ||||
| -rw-r--r-- | less/tables.less | 6 | ||||
| -rw-r--r-- | less/type.less | 2 |
5 files changed, 37 insertions, 35 deletions
diff --git a/less/grid.less b/less/grid.less index e9eb52ef2..1de1b15f6 100644 --- a/less/grid.less +++ b/less/grid.less @@ -12,7 +12,7 @@ .row { .make-row(); } -[class^="span"] { +[class*="col-span-"] { position: relative; min-height: 1px; padding-left: (@grid-gutter-width / 2); @@ -25,7 +25,7 @@ max-width: 728px; } // Generate the grid columns and offsets - [class^="span"] { float: left; } + [class*="col-span-"] { float: left; } .generate-grid-columns(@grid-columns); } @@ -44,6 +44,6 @@ } // Reset utility classes due to specificity -[class*="span"].pull-right { +[class*="col-span-"].pull-right { float: right; } diff --git a/less/mixins.less b/less/mixins.less index 458e58cc9..7a993b1ae 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -449,52 +449,52 @@ .generate-grid-columns(@grid-columns) { // Default columns - .spanX (@index) when (@index > 0) { - .span@{index} { .span(@index); } - .spanX((@index - 1)); + .col-span-X (@index) when (@index > 0) { + .col-span-@{index} { .col-span-(@index); } + .col-span-X((@index - 1)); } - .spanX(0) {} + .col-span-X(0) {} // Offsets (gaps between columns) - .offsetX (@index) when (@index > 0) { - .offset@{index} { .offset(@index); } - .offsetX((@index - 1)); + .col-offset-X (@index) when (@index > 0) { + .col-offset-@{index} { .col-offset-(@index); } + .col-offset-X((@index - 1)); } - .offsetX (0) {} + .col-offset-X (0) {} // Source ordering - .pushX (@index) when (@index > 0) { - .push@{index} { .push(@index); } - .pushX((@index - 1)); + .col-push-X (@index) when (@index > 0) { + .col-push-@{index} { .col-push-(@index); } + .col-push-X((@index - 1)); } - .pushX (0) {} + .col-push-X (0) {} // Source ordering - .pullX (@index) when (@index > 0) { - .pull@{index} { .pull(@index); } - .pullX((@index - 1)); + .col-pull-X (@index) when (@index > 0) { + .col-pull-@{index} { .col-pull-(@index); } + .col-pull-X((@index - 1)); } - .pullX (0) {} + .col-pull-X (0) {} // Apply the styles - .span(@columns) { + .col-span-(@columns) { width: percentage((@columns / @grid-columns)); } - .offset(@columns) { + .col-offset-(@columns) { margin-left: percentage((@columns / @grid-columns)); } - .push(@columns) { + .col-push-(@columns) { left: percentage((@columns / @grid-columns)); } - .pull(@columns) { + .col-pull-(@columns) { right: percentage((@columns / @grid-columns)); } // Generate .spanX and .offsetX - .spanX(@grid-columns); - .offsetX(@grid-columns); - .pushX(@grid-columns); - .pullX(@grid-columns); + .col-span-X(@grid-columns); + .col-offset-X(@grid-columns); + .col-push-X(@grid-columns); + .col-pull-X(@grid-columns); } diff --git a/less/scaffolding.less b/less/scaffolding.less index 2b82d1e90..633222ed8 100644 --- a/less/scaffolding.less +++ b/less/scaffolding.less @@ -30,19 +30,21 @@ html { } body { + font-family: @font-family-base; + .font-size(); + line-height: @line-height-base; color: @text-color; background-color: @body-background; } // Reset fonts for revelant elements -body, input, button, select, textarea { - font-family: @font-family-base; - .font-size(); - line-height: @line-height-base; + font-family: inherit; + font-size: inherit; + line-height: inherit; } diff --git a/less/tables.less b/less/tables.less index b3045bf07..f70d46396 100644 --- a/less/tables.less +++ b/less/tables.less @@ -179,12 +179,12 @@ th { // ----------------- // Reset default table behavior -table col[class^="span"] { +table col[class*="col-span-"] { float: none; display: table-column; } -table td[class^="span"], -table th[class^="span"] { +table td[class*="col-span-"], +table th[class*="col-span-"] { float: none; display: table-cell; } diff --git a/less/type.less b/less/type.less index 55aea4d8a..193078c72 100644 --- a/less/type.less +++ b/less/type.less @@ -13,7 +13,7 @@ p { margin-bottom: @line-height-base; .font-size((@font-size-base * 1.5)); font-weight: 200; - line-height: 1.25; + line-height: 1.3; } |
