Skip to content

Instantly share code, notes, and snippets.

View johnsardine's full-sized avatar

João Sardinha johnsardine

View GitHub Profile
@johnsardine
johnsardine / ms.js
Created December 21, 2011 02:01 — forked from rauchg/ms.md
Milliseconds conversion utility.
/**
# ms.js
No more painful `setTimeout(fn, 60 * 4 * 3 * 2 * 1 * Infinity * NaN * '☃')`.
ms('2d') // 172800000
ms('1.5h') // 5400000
ms('1h') // 3600000
ms('1m') // 60000
@johnsardine
johnsardine / dabblet.css
Created December 21, 2011 16:08 — forked from chriscoyier/dabblet.css
Checkbox Hack
/* Checkbox Hack */
input[type=checkbox] {
position: absolute;
top: -9999px;
left: -9999px;
}
label {
-webkit-appearance: push-button;
-moz-appearance: button;
@johnsardine
johnsardine / dabblet.css
Created March 19, 2012 11:59 — forked from JoelBesada/dabblet.css
CSS States
/* CSS States */
body {
background: url(http://dabblet.com/img/noise.png);
background-color: #F5F2F0;
font-family: Georgia, serif;
font-size: 18px;
line-height: 1.6em;
text-shadow: 0 2px 0 white;
color: #222;
}
@johnsardine
johnsardine / dabblet.css
Created April 19, 2012 15:26 — forked from LeaVerou/dabblet.css
Vertical centering with Flexbox + margin fallback
/**
* Vertical centering with Flexbox + margin fallback
* Lea Verou & David Storey
*/
html, body { height: 100%; }
body {
width: 100%; /* needed for FF */
margin: 0;
body {
background: #ccc url(http://placehold.it/800x600&text=Fixed);
background-attachment: fixed;
}
.menu {
float: left;
background: #fff;
width: 200px;
}
.pages {
@johnsardine
johnsardine / dabblet.css
Created April 21, 2012 13:54 — forked from LeaVerou/dabblet.css
Image interpolation demo
/* Image interpolation demo */
@keyframes browsers {
from, to { background-image: url('http://lea.verou.me/css-4d/img/firefox-logo.png'); }
20% { background-image: url('http://lea.verou.me/css-4d/img/chrome-logo.png'); }
40% { background-image: url('http://lea.verou.me/css-4d/img/safari-logo.png'); }
60% { background-image: url('http://lea.verou.me/css-4d/img/opera-logo.png'); }
80% { background-image: url('http://lea.verou.me/css-4d/img/ie-logo.png'); }
}
@johnsardine
johnsardine / dabblet.css
Created June 5, 2012 20:07 — forked from LeaVerou/dabblet.css
drop-shadow filter vs box-shadow
/**
* drop-shadow filter vs box-shadow
*/
html {
background: url('http://subtlepatterns.com/patterns/purty_wood.png')
}
.speech-bubble {
position: relative;
@johnsardine
johnsardine / dabblet.css
Created June 11, 2012 21:43 — forked from LeaVerou/dabblet.css
CSS Pebbles!
/**
* CSS Pebbles!
*/
html {
background: url("http://michaeliahotel.com/img/sand.jpg");
min-height: 100%;
}
.aside-icons {
@johnsardine
johnsardine / dabblet.css
Created June 19, 2012 08:01 — forked from LeaVerou/dabblet.css
CSS Pebbles!
/**
* CSS Pebbles!
*/
html {
background: url("http://michaeliahotel.com/img/sand.jpg");
min-height: 100%;
}
.aside-icons {
@johnsardine
johnsardine / dabblet.css
Created September 18, 2012 23:58
Estilo da lista que contem cada prova
/* Estilo da lista que contem cada prova */
.event-list {
/* background: red; */
width: 600px;
padding: 0;
padding-left: 10px;
padding-bottom: 10px;
margin: 0;
font-family: sans-serif;