Skip to content

Instantly share code, notes, and snippets.

View yukulele's full-sized avatar

Clément P yukulele

  • France
View GitHub Profile
@yukulele
yukulele / dabblet.css
Created February 4, 2014 16:20 — forked from LeaVerou/dabblet.css
urlencoded SVG checkerboard
/**
* urlencoded SVG checkerboard
*/
html{
min-height: 300px;
background: tan center url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="%2358a"><rect x="50" width="50" height="50" /><rect y="50" width="50" height="50" /></svg>');
background-size: 20px;
transition:2s all;
}
@yukulele
yukulele / scroobar-width.js
Last active August 29, 2015 13:57
scrollbar width
var scrollBarWidth = (function(){
var html = document.documentElement;
var outer = document.createElement("div");
var inner = document.createElement("div");
outer.style.visibility = "hidden";
outer.style.width = "100px";
outer.style.overflow = "scroll";
outer.appendChild(inner);
@yukulele
yukulele / EventEmitter.js
Created June 22, 2015 14:24
EventEmitter ES6
class EventEmitter{
constructor(selector){
this.cb = new Map();
}
on(e,f){
var cb;
if(!this.cb.has(e))
this.cb.set(e, cb = new Set());
else
cb = this.cb.get(e);
@yukulele
yukulele / dabblet.css
Created May 30, 2012 15:49 — forked from anonymous/dabblet.css
My first 3D trasform + transition test
/* My first 3D trasform + transition test */
#c
{
left: 50%;
perspective: 230px;
perspective-origin: 50% 80%;
position: absolute;
top: 50%;
@yukulele
yukulele / dabblet.css
Created August 8, 2012 14:35 — forked from LeaVerou/dabblet.css
3D cube
/**
* 3D cube
*/
#cube {
position:relative;
background:#ccc;
width:300px;
height:300px;
margin:0 auto;
/**
* 3D cube
*/
html,body{
overflow:hidden;
}
#cube {
position:relative;
background:#ccc;
perspective: 200px;
@yukulele
yukulele / dabblet.css
Last active October 8, 2015 07:37
Smiling dice
/**
* Smiling dice
* http://dabblet.com/gist/3299972
*/
html{
background: #333;
color: white;
}
#cube {
@yukulele
yukulele / dabblet.css
Created August 24, 2012 15:06
CSS3 transform + transition experiment
/**
* CSS3 transform + transition experiment
*/
@import url("http://fonts.googleapis.com/css?family=Indie+Flower");
#e{
margin-top:40px;
}
#e>div{
display:inline-block;
width:300px;
@yukulele
yukulele / dabblet.css
Created August 29, 2012 12:23
font-size tests
/* font-size tests*/
div{
background:#eee;
margin:30px;
}
#d1{
font-size:38px;
width:378px;
height:189px;
@yukulele
yukulele / dabblet.css
Created August 29, 2012 13:04
css3 new units: vh, vw, vmin, vmax
/* css3 new units: vh, vw, vmin, vmax */
/* (webkit) */
div{
position:absolute;
top:0;
left:0;
}
#d0{
height:20vmax;