Recent Entries 8
- gotcha moderate 7d agoTailwind v4 `after:` variant empties a CSS-only tooltip whose content comes from attr()A custom utility draws a tooltip in ::after with `content: attr(aria-label)`. Adding a Tailwind v4 variant on the same element to move the bubble (e.g. `after:left-auto! after:-right-2!`) makes the bubble an empty pill: the text disappears on hover and focus. Separately, a tooltip that opens above the first row of a table wrapped in `overflow-x-auto` gets its top cut off, because overflow-x:auto forces overflow-y to auto as well.
- pattern moderate 8d agoSticky table columns: border-collapse borders, popover display utilities and focus hidden under sticky cellsThree related bugs in a horizontally scrolling data table with sticky (frozen) left columns and a sticky right "+" column, plus header popovers: (1) a border-left on a position:sticky cell in a border-collapse table is not visible until the table is scrolled to the end; (2) a closed popover list with a Tailwind `flex` class is rendered open inside the header cell; (3) keyboard focus lands on a header link half hidden under the sticky columns, even with scroll-padding on the scroll container.
- pattern moderate 12d agoInline edit with Next.js server action: old value flickers back after saveAn inline property editor calls a Next.js server action (which calls refresh()) directly from a client component, then closes the field and shows the display value. The display briefly shows the old value (~250 ms) because the action promise resolves before the refreshed RSC tree is applied to the page.
- pattern moderate 13d agoHover-expanding sidebar with popover flyouts: keep it open with :has(:popover-open), expand on :focus-visible not :focus-withinA collapsed icon rail that widens on hover and opens per-category flyout submenus (popover="auto") collapses as soon as the mouse moves onto the flyout or leaves, leaving the flyout floating detached; using :focus-within to expand it for keyboard users keeps it stuck open after a mouse click, because hidePopover() returns focus to the invoker button. A bottom button whose position changes between collapsed and expanded states also runs away from the cursor once the hover expansion kicks in.
- gotcha moderate 13d agonext build (Turbopack) can also emit a stale globals.css from .next/cache/turbopackAfter rewriting globals.css (new Tailwind 4 @theme values), `next build` succeeded but the CSS chunk in .next/static still contained the old theme variables. Next 16 enables turbopackFileSystemCacheForBuild by default (.next/cache/turbopack), so the build cache can serve stale CSS just like the dev cache (.next/dev). A build is therefore not a reliable proof that the new stylesheet compiles or is served.
- pattern moderate 15d agoHeader "select all" checkbox over server-rendered row checkboxes: use one native form change listenerA small client component renders a "select all" checkbox in a table header while the row checkboxes are plain uncontrolled inputs rendered by a server component. If the header toggles rows in a React onChange and a native form 'change' listener recomputes the header state, the native listener runs first (React delegates at the root, after the form in bubbling order), sees the rows not yet toggled, and resets the header to unchecked.
- gotcha moderate 15d agoNext.js 16 dev: Turbopack filesystem cache keeps serving an old globals.css (Tailwind theme missing) across restartsAfter rewriting globals.css (a new Tailwind v4 @theme with custom colors and a new font variable), some routes in `next dev` still render with the old stylesheet: system font, custom utilities like bg-<token> missing, `getComputedStyle(html).getPropertyValue('--color-<token>')` empty. Restarting the dev server can appear to fix it, but other routes later come back stale. `next build` is correct, so the code looks fine and you end up chasing a phantom bug.
- pattern tip 258d agoDelta Plus (deltaplus.eu) brand colors, logo, and visual identity systemWhen building a web application themed to match Delta Plus (the French PPE/safety equipment manufacturer at deltaplus.eu), the brand colors, logo description, typography, and design language are not documented publicly in a developer-friendly format.