add abbr styles, overhaul type docs section to remove lots of verbose text and put emphasis on tables and more scannable content

This commit is contained in:
Mark Otto 2011-10-17 14:17:29 -07:00
parent d035fa731a
commit 27cbe7f63a
5 changed files with 210 additions and 171 deletions

11
bootstrap.css vendored
View File

@ -6,7 +6,7 @@
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Designed and built with all the love in the world @twitter by @mdo and @fat. * Designed and built with all the love in the world @twitter by @mdo and @fat.
* Date: Mon Oct 17 12:44:52 PDT 2011 * Date: Mon Oct 17 14:16:58 PDT 2011
*/ */
/* Reset.less /* Reset.less
* Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc). * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc).
@ -367,6 +367,7 @@ h5,
h6 { h6 {
font-weight: bold; font-weight: bold;
color: #404040; color: #404040;
text-rendering: optimizelegibility;
} }
h1 small, h1 small,
h2 small, h2 small,
@ -388,7 +389,7 @@ h2 {
line-height: 36px; line-height: 36px;
} }
h2 small { h2 small {
font-size: 14px; font-size: 18px;
} }
h3 { h3 {
line-height: 27px; line-height: 27px;
@ -466,6 +467,12 @@ em {
.muted { .muted {
color: #bfbfbf; color: #bfbfbf;
} }
abbr {
font-size: 90%;
text-transform: uppercase;
border-bottom: 1px dotted #ddd;
cursor: help;
}
blockquote { blockquote {
margin-bottom: 18px; margin-bottom: 18px;
border-left: 5px solid #eee; border-left: 5px solid #eee;

5
bootstrap.min.css vendored
View File

@ -63,9 +63,9 @@ a{color:#0069d6;text-decoration:none;line-height:inherit;font-weight:inherit;}a:
.offset10{margin-left:820px;} .offset10{margin-left:820px;}
.offset11{margin-left:900px;} .offset11{margin-left:900px;}
p{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;margin-bottom:9px;}p small{font-size:11px;color:#bfbfbf;} p{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;margin-bottom:9px;}p small{font-size:11px;color:#bfbfbf;}
h1,h2,h3,h4,h5,h6{font-weight:bold;color:#404040;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#bfbfbf;} h1,h2,h3,h4,h5,h6{font-weight:bold;color:#404040;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#bfbfbf;}
h1{font-size:30px;line-height:36px;}h1 small{font-size:18px;} h1{font-size:30px;line-height:36px;}h1 small{font-size:18px;}
h2{font-size:24px;line-height:36px;}h2 small{font-size:14px;} h2{font-size:24px;line-height:36px;}h2 small{font-size:18px;}
h3{line-height:27px;font-size:18px;}h3 small{font-size:14px;} h3{line-height:27px;font-size:18px;}h3 small{font-size:14px;}
h4{font-size:16px;line-height:36px;}h4 small{font-size:12px;} h4{font-size:16px;line-height:36px;}h4 small{font-size:12px;}
h5{font-size:14px;line-height:18px;} h5{font-size:14px;line-height:18px;}
@ -83,6 +83,7 @@ hr{margin:20px 0 19px;border:0;border-bottom:1px solid #eee;}
strong{font-style:inherit;font-weight:bold;} strong{font-style:inherit;font-weight:bold;}
em{font-style:italic;font-weight:inherit;line-height:inherit;} em{font-style:italic;font-weight:inherit;line-height:inherit;}
.muted{color:#bfbfbf;} .muted{color:#bfbfbf;}
abbr{font-size:90%;text-transform:uppercase;border-bottom:1px dotted #ddd;cursor:help;}
blockquote{margin-bottom:18px;border-left:5px solid #eee;padding-left:15px;}blockquote p{font-size:14px;font-weight:300;line-height:18px;margin-bottom:0;} blockquote{margin-bottom:18px;border-left:5px solid #eee;padding-left:15px;}blockquote p{font-size:14px;font-weight:300;line-height:18px;margin-bottom:0;}
blockquote small{display:block;font-size:12px;font-weight:300;line-height:18px;color:#bfbfbf;}blockquote small:before{content:'\2014 \00A0';} blockquote small{display:block;font-size:12px;font-weight:300;line-height:18px;color:#bfbfbf;}blockquote small:before{content:'\2014 \00A0';}
address{display:block;line-height:18px;margin-bottom:18px;} address{display:block;line-height:18px;margin-bottom:18px;}

View File

@ -307,6 +307,11 @@ pre.prettyprint {
max-width: 100%; max-width: 100%;
} }
/* Make tables spaced out a bit more */
h2 + table {
margin-top: 10px;
}
/* Responsive Docs /* Responsive Docs
-------------------------------------------------- */ -------------------------------------------------- */
@media (max-width: 480px) { @media (max-width: 480px) {

View File

@ -406,15 +406,22 @@
<h1>Typography <small>Headings, paragraphs, lists, and other inline type elements</small></h1> <h1>Typography <small>Headings, paragraphs, lists, and other inline type elements</small></h1>
</div> </div>
<h2>Headings &amp; body copy</h2>
<!-- Headings & Paragraph Copy --> <!-- Headings & Paragraph Copy -->
<div class="row"> <div class="row">
<div class="span4"> <div class="span4">
<h2>Headings &amp; copy</h2> <h3>Typographic scale</h3>
<p>A standard typographic hierarchy for structuring your webpages.</p>
<p>The entire typographic grid is based on two Less variables in our preboot.less file: <code>@baseFontSize</code> and <code>@baseLineHeight</code>. The first is the base font-size used throughout and the second is the base line-height.</p> <p>The entire typographic grid is based on two Less variables in our preboot.less file: <code>@baseFontSize</code> and <code>@baseLineHeight</code>. The first is the base font-size used throughout and the second is the base line-height.</p>
<p>We use those variables, and some math, to create the margins, paddings, and line-heights of all our type and more.</p> <p>We use those variables, and some math, to create the margins, paddings, and line-heights of all our type and more.</p>
</div> </div>
<div class="span4"> <div class="span4">
<h3>Example body text</h3>
<p>Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
<p>Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec sed odio dui.</p>
</div>
<div class="span4">
<div class="well">
<h1>h1. Heading 1</h1> <h1>h1. Heading 1</h1>
<h2>h2. Heading 2</h2> <h2>h2. Heading 2</h2>
<h3>h3. Heading 3</h3> <h3>h3. Heading 3</h3>
@ -422,74 +429,107 @@
<h5>h5. Heading 5</h5> <h5>h5. Heading 5</h5>
<h6>h6. Heading 6</h6> <h6>h6. Heading 6</h6>
</div> </div>
<div class="span4">
<h3>Example paragraph</h3>
<p>Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
<h1>Example heading <small>Has sub-heading&hellip;</small></h1>
</div> </div>
</div> </div>
<!-- Misc Elements --> <!-- Misc Elements -->
<div class="row"> <h2>Emphasis, address, and abbreviation</h2>
<div class="span3"> <table class="zebra-striped">
<h2>Misc. elements</h2> <thead>
<p>Using emphasis, addresses, &amp; abbreviations</p> <tr>
<p> <th>Element</th>
<th>Description</th>
<th>Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>&lt;strong&gt;</code> <code>&lt;strong&gt;</code>
</td>
<td>
For emphasizing a snippet of text with <strong>important</strong>
</td>
<td>
<span class="muted">None</span>
</td>
</tr>
<tr>
<td>
<code>&lt;em&gt;</code> <code>&lt;em&gt;</code>
<code>&lt;address&gt;</code> </td>
<td>
For emphasizing a snippet of text with <em>stress</em>
</td>
<td>
<span class="muted">None</span>
</td>
</tr>
<tr>
<td>
<code>&lt;abbr&gt;</code> <code>&lt;abbr&gt;</code>
</p> </td>
</div> <td>
<div class="span9"> Wraps abbreviations and acronyms to show the expanded version on hover
<h3>When to use</h3> </td>
<p>Emphasis tags (<code>&lt;strong&gt;</code> and <code>&lt;em&gt;</code>) should be used to indicate additional importance or emphasis of a word or phrase relative to its surrounding copy. Use <code>&lt;strong&gt;</code> for importance and <code>&lt;em&gt;</code> for <em>stress</em> emphasis.</p> <td>
<h3>Emphasis in a paragraph</h3> Include optional <code>title</code> for expanded text
<p><a href="#">Fusce dapibus</a>, <strong>tellus ac cursus commodo</strong>, <em>tortor mauris condimentum nibh</em>, ut fermentum massa justo sit amet risus. Maecenas faucibus mollis interdum. Nulla vitae elit libero, a pharetra augue.</p> </td>
<p><strong>Note:</strong> It's still okay to use <code>&lt;b&gt;</code> and <code>&lt;i&gt;</code> tags in HTML5 and they don't have to be styled bold and italic, respectively (although if there is a more semantic element, use it). <code>&lt;b&gt;</code> is meant to highlight words or phrases without conveying additional importance, while <code>&lt;i&gt;</code> is mostly for voice, technical terms, etc.</p> </tr>
<h3>Addresses</h3> <tr>
<p>The <code>&lt;address&gt;</code> element is used for contact information for its nearest ancestor, or the entire body of work. Here are two examples of how it could be used:</p> <td>
<code>&lt;address&gt;</code>
</td>
<td>
For contact information for its nearest ancestor or the entire body of work
</td>
<td>
Preserve formatting by ending all lines with <code>&lt;br&gt;</code>
</td>
</tr>
</tbody>
</table>
<div class="row"> <div class="row">
<div class="span4"> <div class="span4">
<h3>Using emphasis</h3>
<p><a href="#">Fusce dapibus</a>, <strong>tellus ac cursus commodo</strong>, <em>tortor mauris condimentum nibh</em>, ut fermentum massa justo sit amet risus. Maecenas faucibus mollis interdum. Nulla vitae elit libero, a pharetra augue.</p>
<p><strong>Note:</strong> Feel free to use <code>&lt;b&gt;</code> and <code>&lt;i&gt;</code> in HTML5, but their usage has changed a bit. <code>&lt;b&gt;</code> is meant to highlight words or phrases without conveying additional importance while <code>&lt;i&gt;</code> is mostly for voice, technical terms, etc.</p>
</div>
<div class="span4">
<h3>Example addresses</h3>
<p>Here are two examples of how the <code>&lt;address&gt;</code> tag can be used:</p>
<address> <address>
<strong>Twitter, Inc.</strong><br> <strong>Twitter, Inc.</strong><br>
795 Folsom Ave, Suite 600<br> 795 Folsom Ave, Suite 600<br>
San Francisco, CA 94107<br> San Francisco, CA 94107<br>
<abbr title="Phone">P:</abbr> (123) 456-7890 <abbr title="Phone">P:</abbr> (123) 456-7890
</address> </address>
</div>
<div class="span4">
<address> <address>
<strong>Full Name</strong><br> <strong>Full Name</strong><br>
<a mailto="">first.last@gmail.com</a> <a mailto="#">first.last@gmail.com</a>
</address> </address>
</div> </div>
<div class="span4">
<h3>Example abbreviations</h3>
<p>Abbreviations are styled with uppercase text and a light dotted bottom border. They also have a help cursor on hover so users have extra indication something will be shown on hover.</p>
<p><abbr title="HyperText Markup Language">HTML</abbr> is the best thing since sliced bread.</p>
<p>An abbreviation of the word attribute is <abbr title="attribute">attr</abbr>.</p>
</div>
</div> </div>
<p><strong>Note:</strong> Each line in an <code>&lt;address&gt;</code> must end with a line-break (<code>&lt;br&gt;</code>) or be wrapped in a block-level tag (e.g., <code>&lt;p&gt;</code>) to properly structure the content.</p>
<h3>Abbreviations</h3>
<p>For abbreviations and acronyms, use the <code>&lt;abbr&gt;</code> tag (<code>&lt;acronym&gt;</code> is deprecated in <abbr title="HyperText Markup Langugage 5">HTML5</abbr>). Put the shorthand form within the tag and set a title for the complete name.</p>
</div>
</div><!-- /row -->
<!-- Blockquotes --> <!-- Blockquotes -->
<div class="row">
<div class="span3">
<h2>Blockquotes</h2> <h2>Blockquotes</h2>
<p> <div class="row">
<code>&lt;blockquote&gt;</code> <div class="span5">
<code>&lt;p&gt;</code>
<code>&lt;small&gt;</code>
</p>
</div>
<div class="span9">
<h3>How to quote</h3>
<p>To include a blockquote, wrap <code>&lt;blockquote&gt;</code> around <code>&lt;p&gt;</code> and <code>&lt;small&gt;</code> tags. Use the <code>&lt;small&gt;</code> element to cite your source and you'll get an em dash <code>&amp;mdash;</code> before it.</p> <p>To include a blockquote, wrap <code>&lt;blockquote&gt;</code> around <code>&lt;p&gt;</code> and <code>&lt;small&gt;</code> tags. Use the <code>&lt;small&gt;</code> element to cite your source and you'll get an em dash <code>&amp;mdash;</code> before it.</p>
<blockquote> <blockquote>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante venenatis dapibus posuere velit aliquet.</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante venenatis dapibus posuere velit aliquet.</p>
<small>Dr. Julius Hibbert</small> <small>Dr. Julius Hibbert</small>
</blockquote> </blockquote>
</div>
<div class="span7">
<pre class="prettyprint linenums"> <pre class="prettyprint linenums">
&lt;blockquote&gt; &lt;blockquote&gt;
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante venenatis dapibus posuere velit aliquet.&lt;/p&gt; &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante venenatis dapibus posuere velit aliquet.&lt;/p&gt;
@ -497,8 +537,9 @@
&lt;/blockquote&gt; &lt;/blockquote&gt;
</pre> </pre>
</div> </div>
</div><!-- /row --> </div>
<!-- Lists -->
<h2>Lists</h2> <h2>Lists</h2>
<div class="row"> <div class="row">
<div class="span3"> <div class="span3">
@ -522,7 +563,7 @@
</ul> </ul>
</div> </div>
<div class="span3"> <div class="span3">
<h4>Unstyled <code>&lt;.unstyled&gt;</code></h4> <h4>Unstyled <code>&lt;ul.unstyled&gt;</code></h4>
<ul class="unstyled"> <ul class="unstyled">
<li>Lorem ipsum dolor sit amet</li> <li>Lorem ipsum dolor sit amet</li>
<li>Consectetur adipiscing elit</li> <li>Consectetur adipiscing elit</li>
@ -570,18 +611,8 @@
<!-- Code --> <!-- Code -->
<div class="row">
<div class="span3"> <h2>Code <small>Inline and block</small></h2>
<h2>Code</h2>
<p>
<code>&lt;code&gt;</code>
<code>&lt;pre&gt;</code>
</p>
<p>Pimp your code in style with two simple tags. For even more awesomeness through javascript, drop in Google's code prettify library and you're set.</p>
</div>
<div class="span9">
<h3>Presenting code</h3>
<p>Code, blocks of or just snippets inline, can be displayed with style just by wrapping in the right tag. For blocks of code spanning multiple lines, use the <code>&lt;pre&gt;</code> element. For inline code, use the <code>&lt;code&gt;</code> element.</p>
<table class="zebra-striped"> <table class="zebra-striped">
<thead> <thead>
<tr> <tr>
@ -617,73 +648,59 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</div><!-- /row -->
<!-- Labels --> <!-- Labels -->
<div class="row"> <h2>Inline labels <small>for special attention</small></h2>
<div class="span3">
<h2>Inline labels</h2>
<p>
<code>&lt;span class="label"&gt;</code>
</p>
<p>Call attention to or flag any phrase in your body text.</p>
</div>
<div class="span9">
<h3>Label anything</h3>
<p>Ever needed one of those fancy <span class="label success">New!</span> or <span class="label important">Important</span> flags when writing code? Well, now you have them. Here's what's included by default:</p>
<table class="zebra-striped"> <table class="zebra-striped">
<thead> <thead>
<tr> <tr>
<th style="width: 50%;">Label</th> <th style="width: 190px;">Labels</th>
<th>Result</th> <th>Markup</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td> <td>
<code>&lt;span class="label"&gt;Default&lt;/span&gt;</code> <span class="label">Default</span>
</td> </td>
<td> <td>
<span class="label">Default</span> <code>&lt;span class="label"&gt;Default&lt;/span&gt;</code>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>
<code>&lt;span class="label success"&gt;New&lt;/span&gt;</code>
</td>
<td> <td>
<span class="label success">New</span> <span class="label success">New</span>
</td> </td>
<td>
<code>&lt;span class="label success"&gt;New&lt;/span&gt;</code>
</td>
</tr> </tr>
<tr> <tr>
<td>
<code>&lt;span class="label warning"&gt;Warning&lt;/span&gt;</code>
</td>
<td> <td>
<span class="label warning">Warning</span> <span class="label warning">Warning</span>
</td> </td>
<td>
<code>&lt;span class="label warning"&gt;Warning&lt;/span&gt;</code>
</td>
</tr> </tr>
<tr> <tr>
<td>
<code>&lt;span class="label important"&gt;Important&lt;/span&gt;</code>
</td>
<td> <td>
<span class="label important">Important</span> <span class="label important">Important</span>
</td> </td>
<td>
<code>&lt;span class="label important"&gt;Important&lt;/span&gt;</code>
</td>
</tr> </tr>
<tr> <tr>
<td> <td>
<code>&lt;span class="label notice"&gt;Notice&lt;/span&gt;</code> <span class="label notice">Notice</span>
</td> </td>
<td> <td>
<span class="label notice">Notice</span> <code>&lt;span class="label notice"&gt;Notice&lt;/span&gt;</code>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</div><!-- /row -->
</section> </section>

View File

@ -24,6 +24,7 @@ p {
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
font-weight: bold; font-weight: bold;
color: @grayDark; color: @grayDark;
text-rendering: optimizelegibility;
small { small {
color: @grayLight; color: @grayLight;
} }
@ -39,7 +40,7 @@ h2 {
font-size: 24px; font-size: 24px;
line-height: @baseLineHeight * 2; line-height: @baseLineHeight * 2;
small { small {
font-size: 14px; font-size: 18px;
} }
} }
h3 { h3 {
@ -134,6 +135,14 @@ em {
color: @grayLight; color: @grayLight;
} }
// Abbreviations and acronyms
abbr {
font-size: 90%;
text-transform: uppercase;
border-bottom: 1px dotted #ddd;
cursor: help;
}
// Blockquotes // Blockquotes
blockquote { blockquote {
margin-bottom: @baseLineHeight; margin-bottom: @baseLineHeight;