Skip to content

Instantly share code, notes, and snippets.

View dbox's full-sized avatar

Daniel Box dbox

View GitHub Profile
@media only screen and (min-width: 1100px) {
#homecontent {
min-height: 650px;
background-size: cover;
}
}
@dbox
dbox / kni-mixins
Created August 21, 2013 19:10
KNI mixins
@mixin transition-all($time) {
-webkit-transition: all $time+s ease;
-moz-transition: all $time+s ease;
-o-transition: all $time+s ease;
transition: all $time+s ease;
}
@mixin transition($property, $time) {
-webkit-transition: $property $time+s ease;
-moz-transition: $property $time+s ease;
@dbox
dbox / Simple resets
Last active December 21, 2015 11:39
/* ==========================================================================
Defaults
========================================================================== */
/* apply a natural box layout model to all elements */
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
@dbox
dbox / section-centering
Last active December 23, 2015 17:49
Centering without using an inner element via @LeaVerou
section {
width: 700px;
padding: 0 calc(50% - 350px);
}
@dbox
dbox / gist:8200937
Created December 31, 2013 19:05
Title Caps
/*
* Title Caps
*
* Ported to JavaScript By John Resig - http://ejohn.org/ - 21 May 2008
* Original by John Gruber - http://daringfireball.net/ - 10 May 2008
* License: http://www.opensource.org/licenses/mit-license.php
*/
(function(){
var small = "(a|an|and|as|at|but|by|en|for|if|in|of|on|or|the|to|v[.]?|via|vs[.]?)";
@dbox
dbox / gist:b7a953f4de1b236f44a9
Created August 4, 2014 16:03
vertically align any element
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
-moz-transform: translateY(-50%);
-o-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
@dbox
dbox / nav order
Last active August 29, 2015 14:04
Android tab nav order
<ul class="page-jump clearfix">
<!-- make sure these match order of content on page -->
<li><a href="#android_overview">Overview</a></li>
<li><a href="#android_quickStart" class="">Quick Guide<span class="locked"><img src="img/lock.png"></span></a></li>
<li><a href="#android_apiPackage" class="">API<span class="locked"><img src="img/lock.png"></span></a></li>
<li><a href="#android_codeSnippet" class="">Code Snippet</a></li>
<li><a href="#android_specs" class="active">Specs</a></li>
<li><a href="#android_videoDownloads">Video Downloads</a></li>
</ul>
@dbox
dbox / slack flatland theme
Created August 8, 2014 22:00
Slack Flatland Theme
#313437,#26292C,#2095F0,#FFFFFF,#2F4251,#D4D4D5,#7298A6,#E75933
based on:
https://github.com/thinkpixellab/flatland
<script>
//required for .cust
$(document).ready(function(){
$('a.cust').on('click',function(){
var newHref = $(this).attr('href');
newHref=newHref.replace("/",".html");
//alert(newHref);
$(this).attr('href',newHref);
});
});
@dbox
dbox / rrssb-href
Last active August 29, 2015 14:06
Href for RRSSB
<!-- Replace with your URL. For best results, make sure you page has the proper FB Open Graph tags in header:
https://developers.facebook.com/docs/opengraph/howtos/maximizing-distribution-media-content/ -->
<a href="https://www.facebook.com/sharer/sharer.php?u=http://yoururlhere.com" class="popup">