tailwind
Technical notes on web development, DevOps, and AI integration.
38 articles
- 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 - 02:58frontend
My Chat Panel Got Clipped by the Fixed Navbar
A fixed navbar takes no space in the document flow, so a 100dvh chat panel still ran short. The fix pairs xl:mt-14 with a 100dvh subtraction.
TL;DR: A fixed navbar floats above the document flow, so it occupies no space and the panel's top slid underneath it despite having the correct height. The fix pairs xl:mt-14 with xl:h-[calc(100dvh-3.5rem)], since h-dvh only answers how tall, not where content starts. Visually, padding and gaps were dropped for one border divider, creating an edge-to-edge three-column surface.
#css#tailwind#layout - 23:40frontend
Aligning Container Gutters With the Navbar Edges
Cards that refuse to line up with the navbar logo come down to gutters: every container moved from px-4 sm:px-6 lg:px-8 to px-3 sm:px-4.
TL;DR: A misaligned card row turned out to be a Tailwind gutter mismatch: the main section used px-4 sm:px-6 lg:px-8 while the navbar used px-3 sm:px-4, leaving a 16-pixel difference at large screens. The fix normalized every max-w-6xl and max-w-7xl container to px-3 sm:px-4, giving one source of truth. Lesson: straight-line misalignment usually means two padding systems assumed identical.
#css#frontend#tailwind