Skip to content

Instantly share code, notes, and snippets.

View rblakejohnson's full-sized avatar

Blake Johnson rblakejohnson

View GitHub Profile
@rblakejohnson
rblakejohnson / new_gist_file
Created May 31, 2013 19:24
CSS: style placeholder text
::-webkit-input-placeholder {
color: red;
}
:-moz-placeholder { /* Firefox 18- */
color: red;
}
::-moz-placeholder { /* Firefox 19+ */
color: red;
}
:-ms-input-placeholder {
@rblakejohnson
rblakejohnson / new_gist_file
Created June 2, 2013 05:19
CSS: Retina media query
@media (-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi) {
}
@rblakejohnson
rblakejohnson / new_gist_file.html
Created June 2, 2013 05:44
JS: Live Reload script
<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
@rblakejohnson
rblakejohnson / new-element.js
Created June 18, 2013 14:34
JS: create new element
var targetArea = document.getElementById("target-area"),
p = document.createElement("p"),
snippet = p.createTextNode("This was created with JS.");
targetArea.appendChild(snippet);
@rblakejohnson
rblakejohnson / new_gist_file
Created June 18, 2013 16:24
IE conditional comments for HTML5 Shiv, Selectivizr, Respond
<!--[if lte IE 8]><script src="//ldscdn.org/scripts/other/html5shiv/html5shiv.3.5.min.js"></script><script src="//ldscdn.org/scripts/other/respond/respond1.1.0-2.js"></script><script src="//ldscdn.org/scripts/other/selectivizr/selectivizr1.0.3b-lds1.min.js"></script><link href="//ldscdn.org/scripts/other/respond/respond-proxy.html" id="respond-proxy" rel="respond-proxy" /><link href="images/1x1.gif" id="respond-redirect" rel="respond-redirect" /> <script src="//ldscdn.org/scripts/other/respond/respond.proxy.js"></script><![endif]-->
@rblakejohnson
rblakejohnson / blockquote.html
Created June 20, 2013 13:17
HTML: blockquote
<figure class="quote">
<blockquote>It is the unofficial force—the Baker Street irregulars.</blockquote>
<figcaption>Sherlock Holmes, <cite>Sign of Four</cite></figcaption>
</figure>
@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;
}
@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: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 / 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>