This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Checkbox Hack */ | |
input[type=checkbox] { | |
position: absolute; | |
top: -9999px; | |
left: -9999px; | |
} | |
label { | |
-webkit-appearance: push-button; | |
-moz-appearance: button; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Vertical centering with Flexbox + margin fallback | |
* Lea Verou & David Storey | |
*/ | |
html, body { height: 100%; } | |
body { | |
width: 100%; /* needed for FF */ | |
margin: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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'); } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* drop-shadow filter vs box-shadow | |
*/ | |
html { | |
background: url('http://subtlepatterns.com/patterns/purty_wood.png') | |
} | |
.speech-bubble { | |
position: relative; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* CSS Pebbles! | |
*/ | |
html { | |
background: url("http://michaeliahotel.com/img/sand.jpg"); | |
min-height: 100%; | |
} | |
.aside-icons { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* CSS Pebbles! | |
*/ | |
html { | |
background: url("http://michaeliahotel.com/img/sand.jpg"); | |
min-height: 100%; | |
} | |
.aside-icons { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media only screen and (min-width: 320px) { | |
/* Small screen, non-retina */ | |
} | |
@media | |
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px), | |
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px), | |
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta content="yes" name="apple-mobile-web-app-capable"> | |
<title>iOS Web App</title> | |
<!-- iPhone --> |
OlderNewer