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
// Usage: cache_for_a_day('data_id', <data>); | |
// If you only provide an ID, it gets | |
// If you provide both, it checks the date and returns cached data if it's been cached less than a day. Otherwise it sets the new data | |
function cache_for_a_day(id, data) { | |
var new_data = {}; | |
var old_data = JSON.parse(localStorage.getItem(id)); | |
if (old_data) { | |
var cache_date = new Date(old_data.cache_date); |
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
/** | |
* Pseudo Element Transformation Tests | |
* A test of 2-dimensional transforms on pseudo-elements. | |
*/ | |
.content { | |
background:grey; | |
} | |
.content:after { | |
position:absolute; |
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
/* | |
*Some <hr> Tests | |
*/ | |
body { | |
text-align:center; | |
} | |
#rule1 { | |
height:1px; | |
background:red; | |
border:2px dashed white; |
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
/** | |
* Wazzat Do? | |
* An interactive Web Platform Diagram. | |
* Inspired by Paul Irish: https://github.com/paulirish/lazyweb-requests/issues/38 | |
*/ | |
h1 { | |
font-size:2em; | |
padding:3px 10px; | |
transition:all 0.5s linear; |
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
/** | |
* Dabble it! | |
* A nice li'l bookmarklet that makes it easy to open a GitHub Gist in Dabblet. | |
* Created by Timothy Miller, 2012. http://q-bobble.com/blog/ | |
* Free for you to use however you wisheth. | |
*/ | |
section { | |
width:70%; | |
margin:30px auto; |
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
/** | |
* Random color pallete | |
*/ | |
h1 { | |
margin:0; | |
padding:50px; | |
} | |
h1:first-child { | |
background:#1F5EFF; | |
} |
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
/** | |
* Border-Box Tests | |
*/ | |
div { | |
width:80%;float:left; | |
height:200px; | |
background:blue; | |
box-sizing:border-box; | |
-moz-box-sizing:border-box; | |
padding:30px; |
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
/** | |
* 3D Transforms Tests | |
*/ | |
div, div:before { | |
color:white; | |
position:absolute; | |
width:500px;height:200px; | |
background:rgba(31, 111, 155,1); | |
transition:all 2s linear; | |
perspective:200px; |
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 Tabs Testing Groundz | |
*/ | |
#tabarea1 { | |
position:relative; | |
background:slategrey; | |
height:200px; | |
} | |
#tabarea1 > .tab > label { |
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
/** | |
* Page flipper | |
*/ | |
* { | |
box-sizing:border-box; | |
} | |
.pages { | |
position:relative; | |
width:30%; height:250px; | |
OlderNewer