CSS Container Queries

CSS Container Queries

This browser support data is from Caniuse, which has more detail. A number indicates that browser supports the feature at that version and up. Notice how the syntax it’s a lot like a…

CSS Length Units

CSS Length Units

Overview This is super tricky because CSS is extremely flexible and there are no definitive or hard-and-fast rules for when to use a specific type of CSS length unit over another. In some…

Managing User Focus with :focus-visible

Managing User Focus with :focus-visible

button:focus-visible { outline-color: black; font-size: 1.2em; font-family: serif; font-weight: bold; } /*** OR ***/ input:focus-visible { outline-color: black; font-size: 1.2em; font-family: serif; font-weight: bold; } Support One example that always comes to mind…

An Approach to Lazy Loading Custom Elements

An Approach to Lazy Loading Custom Elements

connectedCallback() { let scope = this.parentNode; defer(() => { this.discover(scope); }); let observer = this._observer = new MutationObserver(mutations => { for(let { addedNodes } of mutations) { for(let node of addedNodes) { defer(()…

Moving Backgrounds

Moving Backgrounds

GSAP is the main driver there, but I imagine we could make a boiled-down version that simply translates each background layer from left to right at different speeds. Not as cool, of course,…