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
.box { | |
overflow:hidden; | |
margin:2em; | |
border-bottom:1px solid #333; | |
width:1350px; | |
} | |
.graph { | |
float:left; | |
text-align:center; | |
height:100px; |
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
// This is a function declaration | |
function foo(){}; |
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
.grid-1{ width:4.167% } | |
.grid-2{ width:10.417% } | |
.grid-3{ width:16.667% } | |
.grid-4{ width:22.917% } | |
/* etc */ |
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
alert("hello world"); |
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
html { font-size: 62.5%; } | |
body { font-size: 1.4rem; } /* =14px */ | |
h1 { font-size: 2.4rem; } /* =24px */ | |
/* From http://snook.ca/archives/html_and_css/font-size-with-rem */ |
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
.entry { | |
margin: 0; | |
padding: 0; | |
overflow: hidden; | |
width: auto; | |
font-size: 1.5em; | |
line-height: 1.333333333333333em; | |
position: relative; | |
} | |
.entry .entry { |
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
<style> | |
body { font-size:62.5%; /* Resetting font size to around 10px to make working with EMs easier */ } | |
div { font-size:1.5em; } | |
</style> | |
<div>This text is 15px font size at the base zoom level, but | |
<div> this text will be around 22.5px at the base zoom level | |
(varying between 22px and 23px depending on the browser | |
you're using.</div> | |
</div> |
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
(function(){ | |
// Internal vars and functions | |
var s = 1, | |
t = 3, | |
internalFunction = function(){ | |
return s+t; | |
}, | |
externalFunction = function(){ | |
return internalFunction(); | |
}; |
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
(function(){ | |
// Safe, scoped JavaScript here. Phew. | |
})(); |
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
var globalScope = "I'm in the global scope"; | |
var scopedFunction = function(){ | |
var localScope = "I'm not in the global scope"; | |
console.log(localScope); | |
}; | |
console.log(globalScope); | |
// Outputs "I'm in the global scope" |