Skip to content

Instantly share code, notes, and snippets.

View danielmatthew's full-sized avatar

Dan Matthew danielmatthew

View GitHub Profile
@danielmatthew
danielmatthew / mobile-meta
Created July 9, 2012 14:09
Meta tags to make site mobile friendly
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
@danielmatthew
danielmatthew / smooth.css
Created July 6, 2012 09:51
Smooths transitions between media query breakpoints
transition: all .3s ease-out;
-webkit-transition: all .3s ease-out;
-moz-transition: all .3s ease-out;
-o-transition: all .3s ease-out;
@danielmatthew
danielmatthew / .csscomb.json
Last active August 29, 2015 14:26
Preferred CSScomb settings
{
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
"block-indent": " ",
"color-shorthand": true,
"element-case": "lower",
"eof-newline": true,
"leading-zero": true,
"quotes": "double",
@danielmatthew
danielmatthew / sass-mq
Created April 30, 2015 12:15
Sass MQ Mixin
$medium-screen: 30em;
$big-screen: 50em;
@mixin medium {
@media (min-width: #{$medium-screen}) and (max-width: #{$big-screen} - 1px) {
@content;
}
}
@mixin large {
@danielmatthew
danielmatthew / gist:9205095
Created February 25, 2014 08:32
Reduces element margin on scroll. Useful with fixed element.
$(window).scroll(function()
{
$("#phone").css("margin-top",Math.max(0,970-$(this).scrollTop()));
});
}