layout: post current: post cover: assets/images/bear.jpg navigation: True title: A Full and Comprehensive Style Test date: 2012-09-01 10:00:00 tags: class: post-template subclass: 'post' author: john
<p>Below is just about everything you’ll need to style in the theme. Check the source code to see the many embedded elements within paragraphs.</p>
<hr />
<h1 id=“heading1”>Heading 1</h1>
<h2 id=“heading2”>Heading 2</h2>
<h3 id=“heading3”>Heading 3</h3>
<h4 id=“heading4”>Heading 4</h4>
<h5 id=“heading5”>Heading 5</h5>
<h6 id=“heading6”>Heading 6</h6>
<hr />
<p>Lorem ipsum dolor sit amet, <a title=“test link” href=“#”>test link</a> adipiscing elit. <strong>This is strong.</strong> Nullam dignissim convallis est. Quisque aliquam. This is emphasized. Donec faucibus. Nunc iaculis suscipit dui. 5<sup>3</sup> = 125. Water is H<sub>2</sub>O. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. <cite>The New York Times</cite> (That’s a citation). <span style=“text-decoration:underline;”>Underline.</span> Maecenas ornare tortor. Donec sed tellus eget sapien fringilla nonummy. Mauris a ante. Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus.</p>
<p><abbr title=“Hyper Text Markup Language”>HTML</abbr> and <abbr title=“Cascading Style Sheets”>CSS</abbr> are our tools. Mauris a ante. Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus. To copy a file type COPY <var>filename</var>
. <del>Dinner’s at 5:00.</del> <ins>Let’s make that 7.</ins> This <span style=“text-decoration:line-through;”>text</span> has been struck.</p>
<hr />
<h2 id=“media”>Media</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</p>
<h3 id=“bigimage”>Big Image</h3>
<p><img src=“” alt=“Test Image” /></p>
<p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
<h3 id=“smallimage”>Small Image</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.</p>
<p><img src=“” alt=“Small Test Image” /></p>
<p>Labore et dolore.</p>
<hr />
<h2 id=“listtypes”>List Types</h2>
<h3 id=“definitionlist”>Definition List</h3>
<dl> <dt>Definition List Title</dt> <dd>This is a definition list division.</dd> <dt>Definition</dt> <dd>An exact statement or description of the nature, scope, or meaning of something: our definition of what constitutes poetry.</dd> </dl>
<h3 id=“orderedlist”>Ordered List</h3>
<ol> <li>List Item 1 </li> <li>List Item 2 <br /> <ol><li>Nested list item A</li> <li>Nested list item B</li></ol></li> <li>List Item 3</li> </ol>
<h3 id=“unorderedlist”>Unordered List</h3>
<ul> <li>List Item 1</li> <li>List Item 2 <ul><li>Nested list item A</li> <li>Nested list item B</li></ul></li> <li>List Item 3</li> </ul>
<hr />
<h2 id=“table”>Table</h2>
<table> <tbody> <tr> <th>Table Header 1</th> <th>Table Header 2</th> <th>Table Header 3</th> </tr> <tr> <td>Division 1</td> <td>Division 2</td> <td>Division 3</td> </tr> <tr class=“even”> <td>Division 1</td> <td>Division 2</td> <td>Division 3</td> </tr> <tr> <td>Division 1</td> <td>Division 2</td> <td>Division 3</td> </tr> </tbody> </table>
<hr />
<h2 id=“preformattedtext”>Preformatted Text</h2>
<p>Typographically, preformatted text is not the same thing as code. Sometimes, a faithful execution of the text requires preformatted text that may not have anything to do with code. Most browsers use Courier and that’s a good default — with one slight adjustment, Courier 10 Pitch over regular Courier for Linux users.</p>
<h3 id=“code”>Code</h3>
<p>Code can be presented inline, like <?php bloginfo('stylesheet_url'); ?>
, or within a <pre>
block. Because we have more specific typographic needs for code, we’ll specify Consolas and Monaco ahead of the browser-defined monospace font.</p>
<p>Code blocks can also be inserted with the highlight tag as below:</p> <pre>
{% raw %} {% highlight language-x %} # some code {% endhighlight %} {% endraw %}
</pre>
<p>More information about code highlighting in jekyll can be found <a href=“in”>jekyllrb.com/docs/templates/#code-snippet-highlighting“>in Jekyll
documentation</a>.</p>
<p>These area a couple of examples showing the resulting highlighted code:</p>
{% highlight css %} /* css code sample */ container {
float: left; margin: 0 -240px 0 0; width: 100%;
} {% endhighlight %}
{% highlight javascript linenos %} // javascript code sample $.ajax({
type: 'POST', url: 'backend.php', data: "q="+myform.serialize(), success: function(data){ // on success use return data here }, error: function(xhr, type, exception) { // if ajax fails display error alert alert("ajax error response type "+type); }
}); {% endhighlight %}
<p>Now you can also use <a href=“highlight.jshighlightjs.org/”>highlight.js>. For more on how to use it and on the available styles check their <a href=“demohighlightjs.org/static/demo/”>demo> and <a href=“documentationhighlightjs.readthedocs.org/en/latest/”>documentation> pages.</p>
<div class=“system”> <pre><code class=“swift”>// Swift code sample import Foundation
@objc class Person: Entity {
var name: String! var age: Int! init(name: String, age: Int) { /* /* ... */ */ } // Return a descriptive string for this person func description(offset: Int = 0) -> String { return "\(name) is \(age + offset) years old" }
} </code></pre> </div>
<hr />
<h2 id=“blockquotes”>Blockquotes</h2>
<p>Let’s keep it simple. Italics are good to help set it off from the body text. Be sure to style the citation.</p>
<blockquote>
<p>Good afternoon, gentlemen. I am a HAL 9000 computer. I became operational at the H.A.L. plant in Urbana, Illinois on the 12th of January 1992. My instructor was Mr. Langley, and he taught me to sing a song. If you’d like to hear it I can sing it for you. <cite>— <a href="http://en.wikipedia.org/wiki/HAL_9000">HAL 9000</a></cite></p>
</blockquote>
<p>And here’s a bit of trailing text.</p>
<hr />
<h2 id=“textlevelsemantics”>Text-level semantics</h2>
<p>The <a href=“#”>a element</a> example <br /> The <abbr>abbr element</abbr> and <abbr title=“Title text”>abbr element with title</abbr> examples <br /> The b element example <br /> The <cite>cite element</cite> example <br /> The code element
example <br /> The <del>del element</del> example <br /> The <dfn>dfn element</dfn> and <dfn title=“Title text”>dfn element with title</dfn> examples <br /> The em element example <br /> The i element example <br /> The <ins>ins element</ins> example <br /> The <kbd>kbd element</kbd> example <br /> The <mark>mark element</mark> example <br /> The <q>q element <q>inside</q> a q element</q> example <br /> The <s>s element</s> example <br /> The <samp>samp element</samp> example <br /> The <small>small element</small> example <br /> The <span>span element</span> example <br /> The <strong>strong element</strong> example <br /> The <sub>sub element</sub> example <br /> The <sup>sup element</sup> example <br /> The <var>var element</var> example <br /> The <u>u element</u> example</p>
<hr />
<h2 id=“forms”>Forms</h2>
<form> <fieldset> <legend>Inputs as descendents of labels (form legend)</legend> <label> Text input <input type=“text” value=“default value”> </label> <label> Email input <input type=“email”> </label> <label> Search input <input type=“search”> </label> <label> Tel input <input type=“tel”> </label> <label> URL input <input type=“url” placeholder=“http://”> </label> <label> Password input <input type=“password” value=“password”> </label> <label> File input <input type=“file”> </label> <label> Radio input <input type=“radio” name=“rad”> </label> <label> Checkbox input <input type=“checkbox”> </label> <label> <input type=“radio” name=“rad”> Radio input </label> <label> <input type=“checkbox”> Checkbox input </label> <label> Select field <select> <option>Option 01</option> <option>Option 02</option> </select> </label> <label> Textarea <textarea cols=“30” rows=“5” >Textarea text</textarea> </label> </fieldset>
<fieldset> <legend>Clickable inputs and buttons</legend> <input type=“image” src=“placekitten.com/90/24” alt=“Image (input)”> <input type=“reset” value=“Reset (input)”> <input type=“button” value=“Button (input)”> <input type=“submit” value=“Submit (input)”> <button type=“reset”>Reset (button)</button> <button type=“button”>Button (button)</button> <button type=“submit”>Submit (button)</button> </fieldset>
<fieldset id=“boxsize”> <legend>box-sizing tests</legend> <div><input type=“text” value=“text”></div> <div><input type=“email” value=“email”></div> <div><input type=“search” value=“search”></div> <div><input type=“url” value=“example.com”>> <div><input type=“password” value=“password”></div>
<div><input type=“color” value=“#000000”></div> <div><input type=“number” value=“5”></div> <div><input type=“range” value=“10”></div> <div><input type=“date” value=“1970-01-01”></div> <div><input type=“month” value=“1970-01”></div> <div><input type=“week” value=“1970-W01”></div> <div><input type=“time” value=“18:23”></div> <div><input type=“datetime” value=“1970-01-01T00:00:00Z”></div> <div><input type=“datetime-local” value=“1970-01-01T00:00”></div>
<div><input type=“radio”></div> <div><input type=“checkbox”></div>
<div><select><option>Option 01</option><option>Option 02</option></select></div> <div><textarea cols=“30” rows=“5” >Textarea text</textarea></div>
<div><input type=“image” src=“placekitten.com/90/24” alt=“Image (input)”></div> <div><input type=“reset” value=“Reset (input)”></div> <div><input type=“button” value=“Button (input)”></div> <div><input type=“submit” value=“Submit (input)”></div>
<div><button type=“reset”>Reset (button)</button></div> <div><button type=“button”>Button (button)</button></div> <div><button type=“submit”>Submit (button)</button></div> </fieldset> </form>
<hr />
<h2 id=“embeds”>Embeds</h2>
<p>Sometimes all you want to do is embed a little love from another location and set your post alive.</p>
<h3 id=“video”>Video</h3>
<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
<iframe src=“//player.vimeo.com/video/103224792?title=0&byline=0&portrait=0” width=“600” height=“338” frameborder=“0” webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<p>Culpa qui officia deserunt mollit anim id est laborum.</p>
<h3 id=“slides”>Slides</h3>
<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
<script async class=“speakerdeck-embed” data-id=“34d2856027ce01316b5d621ab8e7d421” data-ratio=“1.33333333333333” src=“//speakerdeck.com/assets/embed.js”></script>
<p>Culpa qui officia deserunt mollit anim id est laborum.</p>
<h3 id=“audio”>Audio</h3>
<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
<iframe width=“100%” height=“450” scrolling=“no” frameborder=“no” src=“w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/169381837&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true”>>
<p>Culpa qui officia deserunt mollit anim id est laborum.</p>
<h3 id=“code”>Code</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.</p>
<p><div data-height=“268” data-theme-id=“0” data-slug-hash=“bcqhe” data-default-tab=“js” data-user=“rglazebrook” class='codepen'></p>
<pre><code>var c = new Sketch.create({autoclear: false}),
bigCircle = 50, littleCircle = 5, // The velocity value determines how much to move the spinner head (in radians). velocity = 0.105, hue = 0, // The alpha value below determines the length of the spinner's tail. bg = 'rgba(40,40,40,.075)'; Spinner = function() {};
Spinner.prototype.setup = function() {
this.x = c.width / 2; this.y = c.height / 2 - bigCircle; this.rotation = 0;
} Spinner.prototype.update = function() {
this.rotation += velocity; this.rotation = this.rotation % TWO_PI; this.x = c.width /2 + cos(this.rotation) * bigCircle; this.y = c.height / 2 + sin(this.rotation) * bigCircle;
} Spinner.prototype.draw = function() {
c.fillStyle = 'hsl('+hue+',50%,50%)'; c.beginPath(); c.arc(this.x, this.y, littleCircle, 0, TWO_PI); c.fill(); c.closePath();
} c.setup = function() {
spinner = new Spinner(); spinner.setup();
} c.update = function() {
spinner.update(); hue = ++hue % 360;
} c.draw = function() {
spinner.draw(); c.fillStyle = bg; c.fillRect(0,0,c.width,c.height);
} </code></pre>
<p>See the Pen <a href='@rglazebrookcodepen.io/rglazebrook’>@rglazebrook>) on <a href='codepen.io’>CodePen.
><p></div><script async src=“//codepen.io/assets/embed/ei.js”></script></p>
<p>Isn't it beautiful?</p>