Skip to content

Instantly share code, notes, and snippets.

View aarongarciah's full-sized avatar
💻
Solving problems so you don't have to

Aarón García Hervás aarongarciah

💻
Solving problems so you don't have to
View GitHub Profile
@aarongarciah
aarongarciah / Default (OSX).sublime-keymap
Last active August 29, 2015 14:26 — forked from beaugunderson/Default (OSX).sublime-keymap
Sublime Text macros for converting to and from 2 and 4 space indentation
[
{
"keys": ["super+shift+a"],
"command": "expand_selection",
"args": {"to": "tag"} },
{
"keys": ["ctrl+2"],
"command": "run_macro_file",
"args": {
"file": "Packages/User/to-2.sublime-macro"
@aarongarciah
aarongarciah / dabblet.css
Created August 26, 2015 16:09 — forked from csssecrets/dabblet.css
Zebra striped text lines
/**
* Zebra striped text lines
*/
pre {
padding: .5em;
line-height: 1.5;
background: hsl(20, 50%, 95%);
background-image: linear-gradient(
rgba(120,0,0,.1) 50%, transparent 0);
@aarongarciah
aarongarciah / sanfrancisco-font.css
Created March 7, 2016 10:37
San Francisco Web Font
/**
* http://applemusic.tumblr.com/
* https://jsfiddle.net/xq56dmrh/
*/
/** Ultra Light */
@font-face {
font-family: "San Francisco";
font-weight: 100;
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-ultralight-webfont.woff");
@aarongarciah
aarongarciah / what-forces-layout.md
Created March 7, 2016 11:07 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()