diff options
| author | Mark Otto <[email protected]> | 2012-07-05 15:11:54 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2012-07-05 15:11:54 -0700 |
| commit | 3c07eaa251b73e6c5eff4b56e074c54708a4b4ba (patch) | |
| tree | aa81aea712ca7012cb7bf580ff0e8287c52c21ab /less | |
| parent | c6ee96c02587aeea0da52018325c100bfd45127a (diff) | |
| download | bootstrap-3c07eaa251b73e6c5eff4b56e074c54708a4b4ba.tar.xz bootstrap-3c07eaa251b73e6c5eff4b56e074c54708a4b4ba.zip | |
updates to type scale
Diffstat (limited to 'less')
| -rw-r--r-- | less/navbar.less | 2 | ||||
| -rw-r--r-- | less/tests/css-tests.css | 17 | ||||
| -rw-r--r-- | less/tests/css-tests.html | 39 | ||||
| -rw-r--r-- | less/type.less | 74 | ||||
| -rw-r--r-- | less/variables.less | 4 |
5 files changed, 82 insertions, 54 deletions
diff --git a/less/navbar.less b/less/navbar.less index a9582e0a4..660838eb8 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -206,7 +206,7 @@ float: none; // Vertically center the text given @navbarHeight @elementHeight: 20px; - padding: ((@navbarHeight - @elementHeight) / 2) 12px ((@navbarHeight - @elementHeight) / 2 + 1); + padding: ((@navbarHeight - @elementHeight) / 2) 15px ((@navbarHeight - @elementHeight) / 2 + 1); line-height: 19px; color: @navbarLinkColor; text-decoration: none; diff --git a/less/tests/css-tests.css b/less/tests/css-tests.css index e0870be44..628dbba6f 100644 --- a/less/tests/css-tests.css +++ b/less/tests/css-tests.css @@ -12,9 +12,24 @@ body { .subhead { margin-bottom: 36px; } -h4 { +/*h4 { margin-bottom: 5px; } +*/ + +.type-test { + margin-bottom: 20px; + padding: 0 20px 20px; + background: url(../../docs/assets/img/grid-baseline-20px.png); +} +.type-test h1, +.type-test h2, +.type-test h3, +.type-test h4, +.type-test h5, +.type-test h6 { + xbackground-color: rgba(255,0,0,.2); +} /* colgroup tests */ diff --git a/less/tests/css-tests.html b/less/tests/css-tests.html index 2396e348c..4b8b1a277 100644 --- a/less/tests/css-tests.html +++ b/less/tests/css-tests.html @@ -55,6 +55,45 @@ +<!-- Typography +================================================== --> + +<div class="page-header"> + <h1>Typography</h1> +</div> + +<div class="row"> + <div class="span6"> + <div class="type-test"> + <h1>h1. Heading 1</h1> + <h2>h2. Heading 2</h2> + <h3>h3. Heading 3</h3> + <h4>h4. Heading 4</h4> + <h5>h5. Heading 5</h5> + <h6>h6. Heading 6</h6> + <p>Sed posuere consectetur est at lobortis. Maecenas sed diam eget risus varius blandit sit amet non magna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p> + </div> + </div> + <div class="span6"> + <div class="type-test"> + <h1>h1. Heading 1</h1> + <p>Sed posuere consectetur est at lobortis. Maecenas sed diam eget risus varius blandit sit amet non magna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p> + <h2>h2. Heading 2</h2> + <p>Sed posuere consectetur est at lobortis. Maecenas sed diam eget risus varius blandit sit amet non magna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p> + <h3>h3. Heading 3</h3> + <p>Sed posuere consectetur est at lobortis. Maecenas sed diam eget risus varius blandit sit amet non magna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p> + <h4>h4. Heading 4</h4> + <p>Sed posuere consectetur est at lobortis. Maecenas sed diam eget risus varius blandit sit amet non magna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p> + <h5>h5. Heading 5</h5> + <p>Sed posuere consectetur est at lobortis. Maecenas sed diam eget risus varius blandit sit amet non magna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p> + <h6>h6. Heading 6</h6> + <p>Sed posuere consectetur est at lobortis. Maecenas sed diam eget risus varius blandit sit amet non magna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p> + </div> + </div> +</div> + + + <!-- Fluid grid ================================================== --> diff --git a/less/type.less b/less/type.less index 61a7db493..8ff42476a 100644 --- a/less/type.less +++ b/less/type.less @@ -3,8 +3,8 @@ // -------------------------------------------------- -// BODY TEXT -// --------- +// Body text +// ------------------------- p { margin: 0 0 @baseLineHeight / 2; @@ -20,13 +20,15 @@ p { line-height: @baseLineHeight * 1.5; } -// HEADINGS -// -------- + +// Headings +// ------------------------- h1, h2, h3, h4, h5, h6 { - margin: 0; + margin: (@baseLineHeight / 2) 0; font-family: @headingsFontFamily; font-weight: @headingsFontWeight; + line-height: 1; color: @headingsColor; text-rendering: optimizelegibility; // Fix the character spacing for headings small { @@ -34,59 +36,31 @@ h1, h2, h3, h4, h5, h6 { color: @grayLight; } } -h1 { - font-size: 30px; - line-height: @baseLineHeight * 2; - small { - font-size: 18px; - } -} -h2 { - font-size: 24px; - line-height: @baseLineHeight * 2; - small { - font-size: 18px; - } -} -h3 { - font-size: 18px; - line-height: @baseLineHeight * 1.5; - small { - font-size: 14px; - } -} -h4, h5, h6 { - line-height: @baseLineHeight; -} -h4 { - font-size: 14px; - small { - font-size: 12px; - } -} -h5 { - font-size: 12px; -} -h6 { - font-size: 11px; - color: @grayLight; - text-transform: uppercase; -} +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; } +h2 small { font-size: 18px; } +h3 small { font-size: 14px; } +h4 small { font-size: 14px; } + // Page header +// ------------------------- + .page-header { - padding-bottom: @baseLineHeight - 1; - margin: @baseLineHeight 0; + margin: @baseLineHeight 0 (@baseLineHeight - 1); border-bottom: 1px solid @grayLighter; } -.page-header h1 { - line-height: 1; -} -// LISTS -// ----- +// Lists +// -------------------------------------------------- // Unordered and Ordered lists ul, ol { diff --git a/less/variables.less b/less/variables.less index 5d900164c..9a3e0ed4e 100644 --- a/less/variables.less +++ b/less/variables.less @@ -48,9 +48,9 @@ @serifFontFamily: Georgia, "Times New Roman", Times, serif; @monoFontFamily: Menlo, Monaco, Consolas, "Courier New", monospace; -@baseFontSize: 13px; +@baseFontSize: 14px; @baseFontFamily: @sansFontFamily; -@baseLineHeight: 18px; +@baseLineHeight: 20px; @altFontFamily: @serifFontFamily; @headingsFontFamily: inherit; // empty to use BS default, @baseFontFamily |
