0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-17 09:52:29 +01:00

Redo line-height globally

- Rename -height to -height-base to match other vars
- Drop use of -height across the board and rely on it to be inherited
- Adjust padding of .dropdown-header to account for different line-height of h6 heading element (this needs refactoring for variables and rems also)
This commit is contained in:
Mark Otto 2016-02-03 19:45:13 -08:00
parent 102a20f5b3
commit ba37c37615
14 changed files with 9 additions and 20 deletions

View File

@ -20,7 +20,6 @@
> th,
> td {
padding: $table-cell-padding;
line-height: $line-height;
vertical-align: top;
border: 1px solid $table-border-color;

View File

@ -11,7 +11,7 @@
cursor: pointer;
user-select: none;
border: $input-btn-border-width solid transparent;
@include button-size($btn-padding-y, $btn-padding-x, $font-size-base, $line-height, $btn-border-radius);
@include button-size($btn-padding-y, $btn-padding-x, $font-size-base, $line-height-base, $btn-border-radius);
@include transition(all .2s ease-in-out);
&,

View File

@ -38,7 +38,6 @@ pre {
margin-top: 0;
margin-bottom: 1rem;
font-size: 90%;
line-height: $line-height;
color: $pre-color;
// Account for some code outputs that place code tags in pre tags

View File

@ -70,7 +70,6 @@
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: $line-height;
color: $dropdown-link-color;
text-align: inherit; // For `<button>`s
white-space: nowrap; // prevent links from randomly breaking onto new lines
@ -147,9 +146,8 @@
// Dropdown section headers
.dropdown-header {
display: block;
padding: 3px 20px;
padding: 5px 20px;
font-size: $font-size-sm;
line-height: $line-height;
color: $dropdown-header-color;
white-space: nowrap; // as with > li > a
}

View File

@ -9,7 +9,6 @@
// height: $input-height;
padding: $input-padding-y $input-padding-x;
font-size: $font-size-base;
line-height: $line-height;
color: $input-color;
background-color: $input-bg;
// Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214.

View File

@ -17,7 +17,6 @@
// Image thumbnails
.img-thumbnail {
padding: $thumbnail-padding;
line-height: $line-height;
background-color: $thumbnail-bg;
border: $thumbnail-border-width solid $thumbnail-border-color;
border-radius: $thumbnail-border-radius;

View File

@ -47,7 +47,6 @@
float: left; // Collapse white-space
padding: $pagination-padding-y $pagination-padding-x;
margin-left: -1px;
line-height: $line-height;
color: $pagination-color;
text-decoration: none;
background-color: $pagination-bg;

View File

@ -77,7 +77,7 @@ body {
// Make the `body` use the `font-size-root`
font-family: $font-family-base;
font-size: $font-size-base;
line-height: $line-height;
line-height: $line-height-base;
// Go easy on the eyes and use something other than `#000` for text
color: $body-color;
// By default, `<body>` has no `background-color` so we set one as a best practice.

View File

@ -10,7 +10,6 @@
th,
td {
padding: $table-cell-padding;
line-height: $line-height;
vertical-align: top;
border-top: $table-border-width solid $table-border-color;
}

View File

@ -123,7 +123,6 @@ mark,
.blockquote-footer {
display: block;
font-size: 80%; // back to default font-size
line-height: $line-height;
color: $blockquote-small-color;
&::before {

View File

@ -140,7 +140,7 @@ $grid-gutter-width: 1.875rem !default; // 30px
$font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif !default;
$font-family-serif: Georgia, "Times New Roman", Times, serif !default;
$font-family-monospace: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default;
$font-family-base: $font-family-sans-serif !default;
$font-family-base: $font-family-sans-serif !default;
// Pixel value used to responsively scale all typography. Applied to the `<html>` element.
$font-size-root: 16px !default;
@ -150,6 +150,8 @@ $font-size-lg: 1.25rem !default;
$font-size-sm: .875rem !default;
$font-size-xs: .75rem !default;
$line-height-base: 1.5 !default;
$font-size-h1: 2.5rem !default;
$font-size-h2: 2rem !default;
$font-size-h3: 1.75rem !default;
@ -167,8 +169,6 @@ $display2-weight: 300 !default;
$display3-weight: 300 !default;
$display4-weight: 300 !default;
$line-height: 1.5 !default;
$headings-margin-bottom: ($spacer / 2) !default;
$headings-font-family: inherit !default;
$headings-font-weight: 500 !default;
@ -314,7 +314,7 @@ $input-padding-y-sm: .275rem !default;
$input-padding-x-lg: 1.25rem !default;
$input-padding-y-lg: .75rem !default;
$input-height: (($font-size-base * $line-height) + ($input-padding-y * 2)) !default;
$input-height: (($font-size-base * $line-height-base) + ($input-padding-y * 2)) !default;
$input-height-lg: (($font-size-lg * $line-height-lg) + ($input-padding-y-lg * 2)) !default;
$input-height-sm: (($font-size-sm * $line-height-sm) + ($input-padding-y-sm * 2)) !default;
@ -604,7 +604,7 @@ $label-font-weight: bold !default;
$modal-inner-padding: 15px !default;
$modal-title-padding: 15px !default;
$modal-title-line-height: $line-height !default;
$modal-title-line-height: $line-height-base !default;
$modal-content-bg: #fff !default;
$modal-content-border-color: rgba(0,0,0,.2) !default;

View File

@ -95,6 +95,5 @@
@mixin button-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
padding: $padding-y $padding-x;
font-size: $font-size;
line-height: $line-height;
@include border-radius($border-radius);
}

View File

@ -4,7 +4,6 @@
.page-link {
padding: $padding-y $padding-x;
font-size: $font-size;
line-height: $line-height;
}
.page-item {

View File

@ -5,7 +5,7 @@
font-weight: normal;
letter-spacing: normal;
line-break: auto;
line-height: $line-height;
line-height: $line-height-base;
text-align: left; // Fallback for where `start` is not supported
text-align: start;
text-decoration: none;