Skip to content

Instantly share code, notes, and snippets.

View gooberling's full-sized avatar

Nick Dunn gooberling

  • Inck-D
  • Brighton
View GitHub Profile
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<symbol id="icon-interval" viewBox="0 0 1024 1024">
<title>interval</title>
<!--animation for loading-->
<path stroke="black" d="M512 512 l0 280" id="loadingAnim" stroke-width="60" transform="rotate(133.404 512 512)">
<animateTransform attributeType="XML" attributeName="transform" type="rotate" from="0, 512, 512" to="360, 512, 512" begin="0s" dur="1.5s" repeatCount="indefinite"></animateTransform>
</path>
<path stroke="black" d="M512 512 l0 200" id="loading" stroke-width="60" transform="rotate(256.021 512 512)">
@gooberling
gooberling / CSS triangle mixin
Created March 26, 2013 15:04
CSS triangle mixin
//============================================================
//
// arrow
//
// @param width : px, em
// @param height : px, em
// @param direction : up, down, left, right
// @param color : hex, rgb
//
//============================================================
@gooberling
gooberling / gist:5168870
Last active December 14, 2015 23:49
Correct us of image path in compass
+background(image-url("logo-reg.png") no-repeat)
width: image-width("logo-reg.png")
height: image-height("logo-reg.png")
@gooberling
gooberling / Elements fadein delay
Created March 4, 2013 21:25
Fade in each element with delay
$(elements).each(function(i) {
$(this).delay(200*i).fadeIn('200', 'easeInOutCubic');
});
@gooberling
gooberling / own function
Created February 26, 2013 10:50
Create your own function and then reuse that
(function ($) {
$.fn.highlight = function () {
$(this).css({ color: 'red', background: 'yellow' });
$(this).fadeIn();
};
$('.element').highlight();
@gooberling
gooberling / Sass percentage
Created February 22, 2013 15:36
Percentage width calculation for margin
.center
margin-left: percentage($first_sidebar_width / $page_width)
@gooberling
gooberling / boxsizing.htc
Created February 22, 2013 15:26
Boxsizing fix for IE7
/**
* CSS-JS-BOOSTER
*
* A polyfill for box-sizing: border-box for IE6 & IE7.
*
* JScript
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
@gooberling
gooberling / breakpoint
Created February 22, 2013 15:06
Breakpoint mixin
@mixin breakpoint($max, $min:'')
@if ($min!='')
@media only screen and (min-width: $min) and (max-width: $max) { @content; }
@else
@media only screen and (max-width: $max) { @content; }
@gooberling
gooberling / font size
Created February 22, 2013 15:04
Font size mixin
@mixin font-size($sizeValue: 1.6, $line: $sizeValue * 1.5)
font-size: ($sizeValue * 1) + px
line-height: ($line * 1) + px
font-size: ($sizeValue / 10) + rem
line-height: ($line / 10) + rem
@gooberling
gooberling / Clearfix
Last active December 14, 2015 02:29
Clearfix mixin
// Clearfix to contain floats: h5bp.com/q
@mixin my-clearfix
&:before // prevent top margin colapse
content: ""
display: table
@include pie-clearfix