Skip to content

Instantly share code, notes, and snippets.

@weblancaster
weblancaster / readme example
Last active December 12, 2015 05:48
Read me example
# ${1:Project Name}
TODO: Write a project description
## Installation
TODO: Describe the installation process
## Usage
@weblancaster
weblancaster / px to em
Created October 18, 2012 17:28
Function to transform px to em using SASS
// formula/function to transform px to em.
@function calc-em($target-px, $context) {
@return ($target-px / $context) * 1em;
}
//use like this
selector {
padding-left: calc-em(20px, 16px);
}
@weblancaster
weblancaster / simple-step-how-browsers-works
Last active October 9, 2015 21:37
How modern browsers works in simple steps.
The beauty of how modern browsers works in simple steps.
- Loading resources (img, external css/js, etc).
- Parsing the HTML.
- Creating the DOM Tree (nodes, etc).
- Creating the Render Tree.
- Layout of the render tree.
- Painting.
The science behind the scenes!