Skip to content

Instantly share code, notes, and snippets.

View rblakejohnson's full-sized avatar

Blake Johnson rblakejohnson

View GitHub Profile
@rblakejohnson
rblakejohnson / js: setTimeout
Created August 30, 2013 20:37
JS: setTimeout
window.setTimeout(
function() {
},
1000
);
@rblakejohnson
rblakejohnson / gist:6370315
Created August 28, 2013 19:38 — forked from erunyon/gist:5509414
Markup for titles and subtitles for news. Could use with teaser pattern.
<p>News:</p>
<article>
<header>
<h1 class="entry-title"><a href="/news/hey-look-it-s-news/">Sample News Story</a></h1>
<h2 class="publish-info"><time class="pubdate" datetime="2010-08-31T10:00:00-05:00"><b>Published:</b> August 31, 2010</time></h2>
<h3 class="author"><b>Author:</b> Erik Runyon</h3>
</header>
</article>
<p>Events:</p>
@rblakejohnson
rblakejohnson / new_gist_file
Created August 15, 2013 21:13
Truncate line of text
.truncate {
width: 250px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
@rblakejohnson
rblakejohnson / new_gist_file
Created August 8, 2013 14:45
site container
.container {
max-width: 1000px;
margin: 1em auto;
}
@rblakejohnson
rblakejohnson / new_gist_file
Created August 6, 2013 22:26
CSS property order example
.selector {
/* positioning */
position: absolute;
z-index: 10;
top: 0;
left: 0;
display: inline-block;
overflow: hidden;
width: 100px;
padding: 10px;
@rblakejohnson
rblakejohnson / new_gist_file
Created July 1, 2013 17:25
CSS: Link list
.link-list a {
display: block;
padding: 5px 0;
line-height: 1.4;
}
@rblakejohnson
rblakejohnson / index.html
Created July 1, 2013 17:19
Flyout with triangle on top
<div class="flyout">Box. Lorem ipsum dolor sit met, consect etur dip * isicing elit, sed do eus mod * temp or incididunt ut labore et dolore magna aliqua.</div>
@rblakejohnson
rblakejohnson / new_gist_file
Created July 1, 2013 17:15
CSS: Triangle on top
.flyout {
position: relative;
}
.flyout:before {
content: '';
display: block;
height: 0;
border: 8px solid transparent;
border-bottom-color: red;
position: absolute;
@rblakejohnson
rblakejohnson / new_gist_file
Created July 1, 2013 17:12
Lifted shadows
.lifted-box {
position: relative;
z-index: 1;
}
.lifted {
display: block;
position: relative;
}
.lifted:before,
.lifted:after {
@rblakejohnson
rblakejohnson / new_gist_file
Created July 1, 2013 17:10
CSS: Button text
.button-text {
display: inline-block;
padding: 4px 10px;
line-height: 1.3;
text-align: center;
vertical-align: middle;
cursor: pointer;
}