Skip to content

Instantly share code, notes, and snippets.

<script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
<p>
<!-- class="right" is just there to move the image to the right -->
<img src="/ui/img/images/220x155_white_bg_full-potato.jpg" class="right"/>
It is a mistake to think you can solve any major problems just with potatoes.
</p>
@icaaq
icaaq / dabblet.css
Created September 2, 2013 18:51
Untitled
body{
margin:0;
}
img{
display:block;
}
.holder{
position:relative;
}
.content{
<article class="pin">
<figure>
<a href="me/cat/">
<img src="cat.jpg" alt="My awesome cat">
</a>
<figcaption>Awesome cat description.</figcaption>
</figure>
<p>
<span class="visually-hidden">This pintrest has </span>
<span>25 likes </span>
@icaaq
icaaq / gist:4351996
Created December 21, 2012 10:25
A way of using data URI's in your CSS and it will not throw a security alert if using https in IE7 or IE6. The first background declaration sets the image for all browsers that dont support multiple backgrounds in my case IE6-8 (http://caniuse.com/#feat=multibackgrounds). The second declaration first adds the smallest possible gif and then the s…
.element {
background: url(/stuff/feed-icon-28x28.png) 0 0 no-repeat;
background: url(data:image/gif;base64,R0lGODlhAQABAAAAADs=) -1px -1px no-repeat,
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAZbSURBVHjalFZZjBRFGP6qq7pnmNlZjoXdlXuFIIcbZFmDJC7xgYBKYnggiD6oCEQRXrwSEoMafFVMfEBi8EAhMRjhgcASUBINIBoQFIUIC3LIscsCe87szHR3+f/V3dMzS0h0Zv6p6u6q+ur7j69aaK3x24tjLABLqb+C2iYyaPry766+Djt8V/+n9jo1X9HFtrlfd10VJ5ePZjDPFhKZcdOgpAUhBEB3hUUt9YVlGtNaVvjM3CdTFvgWJD+nvozG8wQNTyTQ2T6Am2dPo3Dr2lxFQ5cz2PAJD8K78w88txBOEtARKG/JChbU4YLgjSlhxprxxggwHCfCcUoqjK0bimR6Jtq+u7pakYtWZ8ZPg09g8AoEIuCG/pM0UdHOLSFKCwhmQgtLFWzKUhGYMOxFyRC4RfvQxT6kHMlebmSGs5Ul4ROYT8/znkZqzmKkJzXBvfk3vFsXyS4AvVehaAOSWahyVhGzECjyAEQYBzLfRSolOf6zGNAMZlcxsTxFesS0FgxrXoToo8nNhfY25M8fgdt2EKLzTAwky1hxXwwCQ3iNoK9M1oWx4q4WPgZ/hHKQGDPdGFpWIH/hEAqHP4LquRQyKnPjYDAdgzJWMCScQPGFY3OrcM8PLZSY1IKqZV9APLwKvkyE7kQMNBhMC0TVpALAIBlsGlhF8ezb9wH6j2yFVT0Sdu0kJCfORqqhGZadjHGdN
@icaaq
icaaq / gist:3235454
Created August 2, 2012 08:34
triggers click on spacebar key
/*
MDN: using the button role https://developer.mozilla.org/en/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role
-----
Warning: Be careful when marking up links with the button role. Buttons are expected to be triggered using the Space key,
while links are expected to be triggered through the Enter key. In other words, when links are used to behave like buttons,
adding role="button" alone is not sufficient. It will also be necessary to add a key event handler that listens for the
Space key in order to be consistent with native buttons.
-----
*/
@icaaq
icaaq / gist:2875487
Created June 5, 2012 14:56
socialshare
(function($) {
"use strict";
/* DROPDOWN CLASS DEFINITION */
var toggle = '[data-toggle="dropdown"]';
var share_selector = '.socialshare';
var fb_iframe = '.socialshare.open[data-type="small-bubbles"] #share-options div.fb-like iframe';
var $share_container;