TechEarl
Topic · CSS

CSS

Layouts that hold up across browsers, devices, and the design changes nobody warned you about.

31 articlesWritten by Ishan Karunaratne
CSS layouts, responsive design, and styling patterns that work across browsers and devices.
CSS :has() is the relational parent selector that styles an element based on its descendants. Baseline in all engines: form-state rows, quantity queries, the previous-sibling trick, and the @supports gate.
FeaturedCSS

The CSS :has() Parent Selector: A Complete Guide

CSS :has() is the parent selector we waited 20 years for: style an element based on what it contains. Now Baseline in every engine. Form rows, quantity queries, the previous-sibling trick, and the @supports gate for old browsers.

More in CSS
A practical guide to the CSS filter property: blur, grayscale, brightness, drop-shadow, chaining, backdrop-filter frosted glass, and performance.

CSS Filters: blur, grayscale, brightness, and drop-shadow

A practical guide to the CSS filter property: blur, grayscale, brightness, contrast, saturate, sepia, hue-rotate, invert, opacity, and drop-shadow. How to chain them, when drop-shadow beats box-shadow, frosted glass with backdrop-filter, and the performance traps.

Ship responsive images with native HTML: srcset width descriptors plus sizes for resolution switching, picture with media for art direction, and source type for AVIF and WebP fallback.

Responsive Images: srcset, sizes, and the picture Element

Ship responsive images with native HTML: srcset width descriptors plus sizes for resolution switching, picture with media for art direction, and source type for AVIF/WebP fallback. Plus the sizes gotcha that quietly defeats the whole thing.

Run a JavaScript callback when a CSS transition or animation ends with transitionend and animationend, filter by propertyName, handle bubbling, and use the Web Animations API finished promise.

Run JavaScript When a CSS Animation or Transition Ends

Fire a JavaScript callback when a CSS transition or animation finishes, using the transitionend and animationend events. The propertyName filtering, the bubbling trap, the cases where the event never fires, and the modern Web Animations API promise alternative.