Blog
Practical CSS & UI tutorials, every guide pairs with a free visual tool on uitweak.
Your Component Styles Are Leaking: CSS @scope and the Donut Scope Fix (2026)
CSS @scope confines selectors to a DOM subtree, and the donut scope sets a lower boundary BEM can never express. Leaking-component fix, :scope, proximity rules, and fallbacks. Baseline 2025 in all engines.
How to Make a Glow Button in Tailwind CSS (2026)
Learn how to make a glow button in Tailwind CSS with copy-paste code: the neon box-shadow halo, hover intensification with lift, brand color matching, dark background tips, and a pulsing variant.
How to Build an FAQ Accordion with Zero JavaScript (2026)
Build a smooth, accessible FAQ accordion with zero JavaScript using native details and summary elements plus Tailwind CSS. One-open-at-a-time mode, animated expand, copy-paste code.
7 :has() Recipes That Delete Your JavaScript (2026)
The CSS :has() parent selector styles a parent based on its children. 7 copy-paste recipes that delete class-toggling JavaScript: cards, forms, nav, empty states, quantity queries, zero-JS themes. Performance gotchas and fallbacks included.
Headings Keep Stranding One Word? text-wrap: balance and pretty Fix It (2026)
text-wrap: balance evens out heading line lengths and text-wrap: pretty kills orphan words in paragraphs, with two declarations and zero JavaScript.
Stop Toggling Theme Classes: CSS Container Style Queries React to Custom Properties (2026)
CSS container style queries let descendants react to a custom property on an ancestor: @container style(--theme: dark). No JS class toggles, no nested data-attribute bugs.
Tailwind Container Queries: The Complete Guide (2026)
Build truly reusable components with Tailwind container queries: @container, named containers, responsive cards that adapt to their parent, with copy-paste code and browser support notes.
Button Text Never Looks Centered? CSS text-box-trim Fixes Font Metrics
text-box-trim trims font-metric dead space above and below text, so buttons, badges and headlines align optically. The recipe, the text-box shorthand, and fallbacks. Now in all three engines.
Hover Tooltips With Zero JavaScript: the html interestfor Attribute
Show tooltips on hover with zero JavaScript using the HTML interestfor attribute (interest invokers). Chrome 142 recipe with anchor positioning, delay tuning, and honest fallbacks.
TypeScript optional vs nullable: Why Your Generated Types Break (2026)
TypeScript optional vs nullable: which one your API means, when exactOptionalPropertyTypes breaks generated types, and copy-paste fixes for JSON, Supabase, and Zod.
border-radius Can't Draw the iOS Look: corner-shape Squircles
border-radius draws circular arcs that read as bolted on. The CSS corner-shape squircle recipe: syntax, per-corner shapes, superellipse tuning, and real Safari/Firefox fallbacks.
Stop Writing .btn--primary: CSS if() Kills Variant Class Explosions
Kill BEM variant class soup with the CSS if() function: one .btn rule, style(--variant) conditionals, live re-evaluation, honest support matrix, @supports fallback.