Skip to content

Instantly share code, notes, and snippets.

View mt3o's full-sized avatar

Teodor Kulej mt3o

View GitHub Profile
@mt3o
mt3o / what-forces-layout.md
Created June 18, 2024 11:37 — 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.

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
@mt3o
mt3o / setup-linux.sh
Created June 13, 2017 13:28 — forked from arosini/setup-linux.sh
Sets up a new Linux installation
#!/bin/bash
##################
# Initialization #
##################
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install curl
##########
<table>
<thead>
<tr>
<th>#</th>
<th>Tytuł</th>
<th>Opis</th>
</tr>
</thead>
<tbody>
<tr>