DHDan Holloraningrimicorn.hashnode.dev·23h ago · 4 min readCSS sibling-index() and sibling-count(): Native Staggering Without nth-child HacksIf you have ever built a staggered animation, where menu items or cards fade in one after another instead of all at once, you know the ritual. You reach for :nth-child(), then you write out a delay fo00
DHDan Holloraningrimicorn.hashnode.dev·1d ago · 4 min readAnimate to height: auto in CSS with interpolate-size and calc-size()You have an accordion. Click the header, the panel expands. You want that expansion to slide open smoothly instead of snapping. So you reach for a transition on height, set the closed state to height:00
DHDan Holloraningrimicorn.hashnode.dev·4d ago · 4 min readJavaScript Iterator Helpers: Stop Converting to Arrays FirstYou have a Set of user IDs, or a Map of cache entries, or a generator streaming rows out of a parser. You want the first ten that match a condition. So you reach for the move you have made a thousand 00
DHDan Holloraningrimicorn.hashnode.dev·Jul 21 · 4 min readCSS :has() in Practice: The Parent Selector You Can Finally ShipFor years, "there's no parent selector in CSS" was one of the first hard truths you learned. You could style a child based on its parent all day, but going the other way meant a class toggle in JavaSc00
DHDan Holloraningrimicorn.hashnode.dev·Jul 20 · 4 min readCSS @function: Reusable Logic Comes Native to the BrowserFor years, the honest answer to "can I write my own function in CSS?" was "no, use Sass." You wanted to name a bit of logic, hand it some arguments, and get a value back. CSS gave you custom propertie00