Skip to content

Instantly share code, notes, and snippets.

View alondahari's full-sized avatar
🔋
Battery low...

Alon Dahari alondahari

🔋
Battery low...
View GitHub Profile
@alondahari
alondahari / Image replacement.css
Created September 26, 2013 05:00
Image replacement
.ir {
border: 0;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color: transparent;
}
@alondahari
alondahari / gist:6710087
Created September 26, 2013 05:06
Image replacement 2
.ir2 {
text-indent: 100%; white-space: nowrap; overflow: hidden;
}
@alondahari
alondahari / rAF.js
Created February 12, 2014 05:04 — forked from paulirish/rAF.js
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
<?php
class ImageManipulator
{
/**
* @var int
*/
protected $width;
/**
* @var int
@alondahari
alondahari / box.sizing.sass
Last active August 29, 2015 14:00
box sizing
.nupoll
box-shadow: 2px 2px 2px 0 grey
border: 4px solid white
background-color: #FCFCFC
display: inline-block
padding: 20px
h1
margin: 0
@alondahari
alondahari / vertical-align.sass
Created April 30, 2014 00:47
vertical align place holder
%vertical-align
position: relative
top: 50%
transform: translateY(-50%)
@alondahari
alondahari / Autoprefixer
Created May 21, 2014 10:21
autoprefixer
require 'autoprefixer-rails'
on_stylesheet_saved do |file|
css = File.read(file)
File.open(file, 'w') do |io|
io << AutoprefixerRails.process(css)
end
end