Mousing over an element and watching it tilt in 3D space is a beautiful and compelling effect. Let's bring it to mobile and use the phone itself rather than a cursor.
A context menu is like a tooltip in that it opens right next to the the thing that opened it. Here, we animate the opening and ensure it opens somewhere where it doesn't get cut off.
Matt Smith: React Hooks have been around for years, but most codebases still use them the same way: a bit of useState, an overworked useEffect, and a lot of patterns that get copy-pasted without much thought. […]
Despite some not-great recent news about security vulnerabilities, React Server Components (RSCs) are likely in pretty high volume use around the internet thanks to default usage within Next.js, perhaps without users even really knowing it. I enjoyed Nadia Makarevich’s performance-focuced look at them in Bundle Size Investigation: A Step-by-Step Guide to Shrinking Your JavaScript. The […]
There is a way to declare a scope on a specific selector, a specific selector *down to* another selector, or with no
Bruce Lawson: I was excited to see that the proposed new Web Install API has entered Origin Trial in Chromium. It kind of works in Chromium Canary, but is most complete in Microsoft Edge beta […] The reason I was excited is because I read the Web install API explainer when it was announced a few months ago: The […]
The `!important` part doesn't become part of the value, the whole declaration is treated as !important;
Bramus wrote this almost a year ago, but I’d still call it a relatively new feature of JavaScript and one very worth knowing about. With Node.prototype.moveBefore you can move elements around a DOM tree, without resetting the element’s state. You don’t need it to maintain event listeners, but, as Bramus notes, it’ll keep an iframe loaded, animations […]
You can use a smaller part of Lit to build web web components that still take advantage of some of it's best features, particularly if you're cool with Light DOM.
Fixed and sticky positioning behave very differently, but we can switch between the two at exact points for some unusual looking effects.
Exploring a Card component made hyper flexible though use of easily changeable custom properties, props, and slots.
There was a quick surge of people re-creating liquid glass in the browser shortly after Apple’s debut of the aesthetic. Now that it’s settled in a bit, there have been some slower more detailed studies.
In JavaScript, you can detect a view transition happening, set a type, and have CSS do unique things based on that type.
Matt Smith with wonderfully straightforward writing on why default parameters for functions are a good idea. I like the tip where you can still do it with an object-style param.
There are no browser implementations of mixins yet, nor a fleshed out spec. So perhaps now is the best time to try to understand and opine.