ai
Technical notes on web development, DevOps, and AI integration.
80 articles
- 14:17frontend
Fullscreen Mobile Chat Under a Fixed 66px Header
Fullscreen mobile wrapper under a 66px fixed header using mt-66px plus calc 100dvh-66px, uncapped transcript, and a compact messaging header.
#css#tailwind#frontend - 12:40frontend
Duplicate Order 1: When My History Sidebar Vanished at lg
My chat history sidebar vanished at the lg breakpoint: a CSS order tie-break and a details element forced into flex duty, two roots in one commit.
TL;DR: A missing sidebar at lg breakpoints came down to two bugs from a mobile accordion refactor. Equal flex order values let the center wrapper win the source-order tie-break, fixed with an explicit lg:order-2. A details element can't flex-size children in Chromium, so it became state-driven with aria-expanded instead.
#css#react#tailwind - 12:35frontend
44px Buttons, 16px Fonts: Standard Numbers in Mobile Chat
A responsive pass on my AI chat panel: 44px send targets per WCAG, 16px input fonts against iOS zoom, and a 65vh transcript with overscroll containment.
TL;DR: A desktop-tidy chat panel broke on mobile in three unrelated ways, each fixed by a standardized number. Buttons grew to 44px per WCAG target-size guidance, and the textarea got a 16px font to stop Safari's forced zoom. A 65vh transcript with overscroll containment stops scroll chaining and pull-to-refresh.
#css#tailwind#react - 16:26frontend
The Card Was Square, the Wrapper Wasn't
The output card was already square at xl, but the panel still looked like a box in a box; the wrapper's padding and gap had to go too.
TL;DR: The chat center panel card was already square, yet a thin white strip and sidebar gaps remained. The wrapper still carried xl:p-4 and default gap-4, so the one-line fix was xl:p-0 xl:gap-0 on the parent. Lesson: a wrong-looking element isn't always the wrong one; match child resets with parent spacing resets at the same breakpoint.
#css#tailwind#layout - 15:34frontend
The Middle Panel Became a Box on Wide Screens With Two Utilities
The AI output panel stays a card on mobile, then xl:rounded-none and xl:border-0 square it at xl: mobile-first override at one breakpoint.
TL;DR: The author flattened the last card-looking panel in a three-column AI workspace by appending xl:rounded-none xl:border-0 to the existing classes in AiChatWorkspace.tsx. Tailwind's mobile-first cascade keeps card styling on small screens and drops the border only at the xl breakpoint, making the override easy to reverse. Lesson learned: overly terse commit messages like "no border" mislead future readers.
#css#tailwind#frontend - 15:30frontend
The Context Panel Stopped Being a Card: Border Became a Divider
The right context panel dropped its floating-card frame for a single left-border divider, matching the sidebar's design language.
TL;DR: The author changed a right panel from floating card to flush panel by swapping rounded corners and a four-sided border for a single left border. The border's job shifted from frame to divider, not removal. Lesson: when converting a card to a panel, ask what the border should do now.
#css#tailwind#frontend - 15:30frontend
My Navbar's Bottom Border Was There All Along, Only Transparent
The unscrolled navbar looked borderless because border-transparent still renders 1px with an invisible color. One-line fix: border-border/60.
TL;DR: The navbar's "missing" border was actually always rendered with border-transparent, reserving its pixel and preventing layout shift on scroll. The fix was one class swap to border-border/60, letting the existing transition handle everything. Lesson: keep elements present and control their color, not their visibility.
#css#tailwind#frontend - 03:12frontend
My Light-Mode Navbar Uses bg-white/60, Not the Token
Brightening the shared background token shifts the whole page. A navbar needs a solid chrome feel, so a literal color plus the dark variant wins.
TL;DR: Light mode made the navbar look like dirty glass because the shared background token added a grayish cast. The fix swaps in literal bg-white utilities for light mode in both scroll branches while dark mode keeps the token. Trade-off: the navbar won't follow future theme changes, but a dedicated token is a one-line swap later.
#css#tailwind#design - 03:07frontend
I Moved the Chat Mode Toggle to the Top of the Sidebar
Mode chips at the bottom of a sidebar stay invisible until you scroll. Moved to the top, with type and aria-pressed kept intact.
TL;DR: Moving the chat mode switch to the sidebar's top fixed a real usability bug: users only found the search-versus-about toggle after scrolling past the decision point. Core lesson: layout order is decision order, so mode-setting controls belong above scrollable content. The move kept accessibility attributes like aria-pressed and type=button intact, shrinking the form to one responsibility.
#react#accessibility#tailwind