Skip to content

Instantly share code, notes, and snippets.

const toColour = arr => {
return (
"#" +
arr
.map(el => {
if (el < 10) {
return "0" + Number(el.toFixed(0)).toString(16);
}
const value = Number(el.toFixed(0)).toString(16);
return value.length < 2 ? "0" + value : value;
@Dmitryure
Dmitryure / composing-software.md
Created October 31, 2020 10:55 — forked from rosario/composing-software.md
Eric Elliott's Composing Software Series
@Dmitryure
Dmitryure / dom_performance_reflow_repaint.md
Created October 8, 2020 19:46 — forked from faressoft/dom_performance_reflow_repaint.md
DOM Performance (Reflow & Repaint) (Summary)

DOM Performance

Rendering

  • How the browser renders the document
    • Receives the data (bytes) from the server.
    • Parses and converts into tokens (<, TagName, Attribute, AttributeValue, >).
    • Turns tokens into nodes.
    • Turns nodes into the DOM tree.
  • Builds CSSOM tree from the css rules.