0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

fixes #5216: calculate heading sizes via math rather than fixed pixel amounts

This commit is contained in:
Mark Otto 2012-09-22 22:16:12 -07:00
parent c3ea955661
commit af871d57c9
2 changed files with 30 additions and 25 deletions

View File

@ -655,7 +655,7 @@ h6 {
margin: 10px 0; margin: 10px 0;
font-family: inherit; font-family: inherit;
font-weight: bold; font-weight: bold;
line-height: 1; line-height: 20px;
color: inherit; color: inherit;
text-rendering: optimizelegibility; text-rendering: optimizelegibility;
} }
@ -671,42 +671,42 @@ h6 small {
color: #999999; color: #999999;
} }
h1 { h1,
font-size: 36px; h2,
h3 {
line-height: 40px; line-height: 40px;
} }
h1 {
font-size: 38.5px;
}
h2 { h2 {
font-size: 30px; font-size: 31.5px;
line-height: 40px;
} }
h3 { h3 {
font-size: 24px; font-size: 24.5px;
line-height: 40px;
} }
h4 { h4 {
font-size: 18px; font-size: 17.5px;
line-height: 20px;
} }
h5 { h5 {
font-size: 14px; font-size: 14px;
line-height: 20px;
} }
h6 { h6 {
font-size: 12px; font-size: 11.9px;
line-height: 20px;
} }
h1 small { h1 small {
font-size: 24px; font-size: 24.5px;
} }
h2 small { h2 small {
font-size: 18px; font-size: 17.5px;
} }
h3 small { h3 small {

View File

@ -57,7 +57,7 @@ h1, h2, h3, h4, h5, h6 {
margin: (@baseLineHeight / 2) 0; margin: (@baseLineHeight / 2) 0;
font-family: @headingsFontFamily; font-family: @headingsFontFamily;
font-weight: @headingsFontWeight; font-weight: @headingsFontWeight;
line-height: 1; line-height: @baseLineHeight;
color: @headingsColor; color: @headingsColor;
text-rendering: optimizelegibility; // Fix the character spacing for headings text-rendering: optimizelegibility; // Fix the character spacing for headings
small { small {
@ -66,17 +66,22 @@ h1, h2, h3, h4, h5, h6 {
color: @grayLight; color: @grayLight;
} }
} }
h1 { font-size: 36px; line-height: 40px; }
h2 { font-size: 30px; line-height: 40px; }
h3 { font-size: 24px; line-height: 40px; }
h4 { font-size: 18px; line-height: 20px; }
h5 { font-size: 14px; line-height: 20px; }
h6 { font-size: 12px; line-height: 20px; }
h1 small { font-size: 24px; } h1,
h2 small { font-size: 18px; } h2,
h3 small { font-size: 14px; } h3 { line-height: @baseLineHeight * 2; }
h4 small { font-size: 14px; }
h1 { font-size: @baseFontSize * 2.75; } // ~38px
h2 { font-size: @baseFontSize * 2.25; } // ~32px
h3 { font-size: @baseFontSize * 1.75; } // ~24px
h4 { font-size: @baseFontSize * 1.25; } // ~18px
h5 { font-size: @baseFontSize; }
h6 { font-size: @baseFontSize * .85; } // ~12px
h1 small { font-size: @baseFontSize * 1.75; } // ~24px
h2 small { font-size: @baseFontSize * 1.25; } // ~18px
h3 small { font-size: @baseFontSize; }
h4 small { font-size: @baseFontSize; }
// Page header // Page header