Skip to content

Instantly share code, notes, and snippets.

@JM-Mendez
JM-Mendez / frankenraw.zsh-theme
Last active December 2, 2020 04:54 — forked from cravacuore/raw.zsh-theme
Zsh 'raw' theme [ZSH theme] #zsh #theme
# Copied and modified from https://dev.to/cravacuore/comment/i7g0
# Inspired by making a mixture the following themes:
# robbyrussell + arrow + lambda
# changing some colors and elements positions
local ret_status="%(?:%{$fg_bold[grey]%}λ :%{$fg_bold[red]%} λ )"
# ellipsis https://github.com/ohmyzsh/ohmyzsh/issues/7525#issuecomment-456074298
PROMPT=' ${ret_status}%{$fg[magenta]%}%c %{$fg[black]%}git:(%{$fg[cyan]%}%30>...>$(git_current_branch)%>>%{$fg[black]%}$(parse_git_dirty)%{$reset_color%} ➤ %{$reset_color%}'
@paulirish
paulirish / what-forces-layout.md
Last active November 19, 2024 08:58
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