Skip to content

Instantly share code, notes, and snippets.

View merih's full-sized avatar
🪐

Merih Akar merih

🪐
View GitHub Profile
@ebidel
ebidel / index.html
Created September 16, 2016 03:06
<card-swiper> custom element - demonstrates the usage of the v1 polyfills.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<title>How to use the Custom Elements v1 + Shadow DOM v1 polyfills</title>
<style>
body {
font-family: sans-serif;
@paulirish
paulirish / what-forces-layout.md
Last active June 17, 2024 12:46
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
Projects - Cmd + Shift + A
Dashboard - Cmd + D
Styleguide - Cmd + G
Jump to Next Screen - →
Jump to Previous Screen - ←
Jump to Screen - Cmd + J
Show/Hide Versions - Cmd + Alt + V