Skip to content

Instantly share code, notes, and snippets.

View joshkennedy's full-sized avatar
:shipit:
Slingin' divs and takin' names

Josh Kennedy joshkennedy

:shipit:
Slingin' divs and takin' names
View GitHub Profile
@joshkennedy
joshkennedy / flexbox-mixin
Created October 24, 2013 00:45
Sass flexbox mixin
@mixin flexbox() {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
}
@mixin flex($values) {
-webkit-box-flex: $values;
@joshkennedy
joshkennedy / responsive-100-percent-header
Created October 22, 2013 00:29
Responsive 100% header
$("#header").css({
height: $(window).height() + "px"
});
@joshkennedy
joshkennedy / parallax.js
Created September 20, 2013 01:39
Sexy parallax scroll
var parallax;
parallax = function() {
var scrolled;
scrolled = $(window).scrollTop();
return $(".parallax").css("background-position", "center " + (scrolled * 0.2) + "px");
};
$(window).scroll(function(e) {
return parallax();
$('section.content img').each(function() {
var me = $(this);
var src = me.attr('src');
me.wrap('<figure class="image-wrapper ' + me.attr('title') + '" />')
.after('<figcaption>' + $(this).attr('alt') + '</figcaption>')
.attr('src', './content/' + src);
});
@joshkennedy
joshkennedy / gist:5464460
Last active December 16, 2015 16:39
HTML: boilerplate
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Title</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
@joshkennedy
joshkennedy / dabblet.css
Created October 16, 2012 03:39
Untitled
@import url("http://propublica.github.com/stateface/reference/stateface.css");
@font-face {
font-family: 'StateFaceRegular';
src: url('http://propublica.github.com/stateface/font/webfont/stateface-regular-webfont.eot');
src: url('http://propublica.github.com/stateface/font/webfont/stateface-regular-webfont.eot?#iefix') format('embedded-opentype'),
url('http://propublica.github.com/stateface/font/webfont/stateface-regular-webfont.woff') format('woff'),
url('http://propublica.github.com/stateface/font/webfont/stateface-regular-webfont.ttf') format('truetype'),
url('http://propublica.github.com/stateface/font/webfont/stateface-regular-webfont.svg#StateFaceRegular') format('svg');
font-weight: normal;
font-style: normal;
@joshkennedy
joshkennedy / dabblet.css
Created September 5, 2012 16:02 — forked from anonymous/dabblet.css
Untitled
#post {
width: 700px;
}
#post p {
margin-bottom: 10px;
}
#post p span {
display: block;
width: 340px;
float: left;