diff options
| author | Mark Otto <[email protected]> | 2012-09-18 20:56:20 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2012-09-18 20:56:20 -0700 |
| commit | 2769241aeb5e9eba4a34ddbd9d495f7f8271e360 (patch) | |
| tree | 5c2cb4a217e7b3e6e7d8d457b69e9683ecefbf12 /less | |
| parent | 37460e58d3139ef43425583b50d967341ec43930 (diff) | |
| download | bootstrap-2769241aeb5e9eba4a34ddbd9d495f7f8271e360.tar.xz bootstrap-2769241aeb5e9eba4a34ddbd9d495f7f8271e360.zip | |
add new vars for common font-sizes and paddings with large, small, and mini components; resize pagination and buttons to better match each other
Diffstat (limited to 'less')
| -rw-r--r-- | less/buttons.less | 22 | ||||
| -rw-r--r-- | less/pagination.less | 48 | ||||
| -rw-r--r-- | less/variables.less | 14 |
3 files changed, 46 insertions, 38 deletions
diff --git a/less/buttons.less b/less/buttons.less index c80986ea7..1fa33d1e5 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -71,11 +71,17 @@ // Button Sizes // -------------------------------------------------- +// Reset line-heights +.btn-large, +.btn-small, +.btn-mini { + line-height: 1; +} + // Large .btn-large { - padding: 9px 14px; - font-size: @baseFontSize + 2px; - line-height: normal; + padding: @paddingLarge; + font-size: @fontSizeLarge; .border-radius(5px); } .btn-large [class^="icon-"] { @@ -84,9 +90,8 @@ // Small .btn-small { - padding: 3px 9px; - font-size: @baseFontSize - 2px; - line-height: @baseLineHeight - 2px; + padding: @paddingSmall; + font-size: @fontSizeSmall; } .btn-small [class^="icon-"] { margin-top: 0; @@ -94,9 +99,8 @@ // Mini .btn-mini { - padding: 2px 6px; - font-size: @baseFontSize - 3px; - line-height: @baseLineHeight - 3px; + padding: @paddingMini; + font-size: @fontSizeMini; } diff --git a/less/pagination.less b/less/pagination.less index 57771824a..2c823e149 100644 --- a/less/pagination.less +++ b/less/pagination.less @@ -2,21 +2,30 @@ // Pagination (multiple pages) // -------------------------------------------------- +// Space out pagination from surrounding content +.pagination { + margin: @baseLineHeight 0; +} .pagination ul { + // Allow for text-based alignment display: inline-block; .ie7-inline-block(); + // Reset default ul styles margin-left: 0; margin-bottom: 0; - .border-radius(3px); + // Visuals + .border-radius(4px); .box-shadow(0 1px 2px rgba(0,0,0,.05)); } .pagination ul > li { - display: inline; + display: inline; // Remove list-style and block-level defaults } .pagination ul > li > a, .pagination ul > li > span { - float: left; + float: left; // Collapse white-space + padding: 10px 14px; + line-height: 1; text-decoration: none; background-color: @paginationBackground; border: 1px solid @paginationBorder; @@ -57,50 +66,31 @@ text-align: right; } + // Pagination Sizes // -------------------------------------------------- -// Default -.pagination { - margin: (@baseLineHeight - 3) 0; - height: @baseLineHeight + 10; - font-size: @baseFontSize; - ul > li > a, - ul > li > span { - padding: 0 12px; - line-height: @baseLineHeight + 8; - } -} // Large .pagination-large { - margin: @baseLineHeight 0; - height: @baseLineHeight + 18; - font-size: @baseFontSize + 2px; + font-size: @fontSizeLarge; ul > li > a, ul > li > span { - padding: 0 15px; - line-height: (@baseLineHeight * 2) - 4; + padding: @paddingLarge; } } // Small .pagination-small { - margin: (@baseLineHeight - 5) 0; - height: @baseLineHeight + 6; - font-size: @baseFontSize - 2px; + font-size: @fontSizeSmall; ul > li > a, ul > li > span { - padding: 0 10px; - line-height: @baseLineHeight + 2; + padding: @paddingSmall; } } // Mini .pagination-mini { - margin: (@baseLineHeight - 10) 0; - height: @baseLineHeight + 3; - font-size: @baseFontSize - 3px; + font-size: @fontSizeMini; ul > li > a, ul > li > span { - padding: 0 8px; - line-height: @baseLineHeight + 1; + padding: @paddingMini; } } diff --git a/less/variables.less b/less/variables.less index 734664316..5fb685377 100644 --- a/less/variables.less +++ b/less/variables.less @@ -57,6 +57,7 @@ @headingsFontWeight: bold; // instead of browser default, bold @headingsColor: inherit; // empty to use BS default, @textColor + // Tables // ------------------------- @tableBackground: transparent; // overall background-color @@ -97,6 +98,7 @@ @inputDisabledBackground: @grayLighter; @formActionsBackground: #f5f5f5; + // Dropdowns // ------------------------- @dropdownBackground: @white; @@ -116,6 +118,7 @@ // COMPONENT VARIABLES // -------------------------------------------------- + // Z-index master list // ------------------------- // Used for a bird's eye view of components dependent on the z-axis @@ -128,6 +131,17 @@ @zindexModal: 1050; +// Component size variations +// ------------------------- +@fontSizeLarge: @baseFontSize * 1.25; // ~18px +@fontSizeSmall: @baseFontSize * 0.85; // ~12px +@fontSizeMini: @baseFontSize * 0.75; // ~11px + +@paddingLarge: 10px 19px; +@paddingSmall: 6px 10px; +@paddingMini: 5px 6px; + + // Sprite icons path // ------------------------- @iconSpritePath: "../img/glyphicons-halflings.png"; |
