Skip to content

Instantly share code, notes, and snippets.

@CodeMyUI
CodeMyUI / BoLWPo.markdown
Created September 29, 2015 03:56 — forked from anonymous/BoLWPo.markdown
BoLWPo
@paulirish
paulirish / what-forces-layout.md
Last active July 5, 2024 08:26
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.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@brendajin
brendajin / gist:8190614
Last active January 1, 2016 19:29
New Year's Resolutions for the Burgeoning Self-Taught Female Hacker

#New Year's Resolutions for the Burgeoning Self-Taught Female Hacker

Last January, I attended my first hackathon and commited to learning to code. Fast forward to May, and I landed my first full-time position as a Developer.

When people ask me how I did it, I always say that the most challenging aspect of a career transition is psychological. The technical learning can be done with elbow grease, but no career transition is possible without psychological fortitude.

Along the way, there will be self-doubt, hundreds of rejected job applications, cold recruiters, and days when you feel like your goal is too far beyond your reach. To this, I say: you can do it.

So in light of the new year, I've put together a non-prescriptive list to inspire your 2014 resolutions. If you are a burgeoning self-taught female hacker: you go, girl.

@charliepark
charliepark / rainbow-border.css
Created August 21, 2012 00:21
CSS animations to give a div a rainbow border, perpetually changing color
@-webkit-keyframes rainbow {
0% {border-color: hsl(0, 100%, 50%);}
100% {border-color: hsl(255, 100%, 50%);}
}
.rainbow_border{
border: 4px solid hsl(0, 100%, 50%);
-webkit-animation: rainbow 5s infinite alternate;
}