- CSS Variables:
- Declaration:
--varName: value;
/* GLOBAL variables (because of :root) */ :root { /* <-- refers to the HTML doc */ --spacing: 10px; /* variable declaration and assignment */ --blur: 10px; /* You HAVE to assign it a value */ }
- Usage:
var(--varName);
img { background: var(--base); padding: var(--spacing); filter: blur(var(--blur)); }
- Declaration:
- The difference between a
NodeList
and anArray
object ? The methods available. - Short-circuit evaluation:
const suffix = this.dataset.sizing || ' ';
// The first non-falsy value is returned.
// If all values are falsy, the last one is returned.
Document.documentElement
returns the<html>
element. Note
document.documentElement;