Tags: after

4

sparkline

Monday, March 29th, 2021

CSS { In Real Life } | Quick Tip: Style Pseudo-elements with Javascript Using Custom Properties

Oh, this is smart! You can’t target pseudo-elements in JavaScript, but you can use custom properties as a proxy instead.

Thursday, February 25th, 2021

Diving into the ::before and ::after Pseudo-Elements / Coder’s Block

A thorough deep dive into generated content in CSS.

Wednesday, March 9th, 2016

Styling Broken Images

This is really, really clever. You can’t use generated content (:before and :after) on replaced content. The img element is replaced content …but only when the image actually loads. So if the image fails to load, you can apply specific fallback styles (using :before and :after).

Tuesday, December 9th, 2014

The Nor » Living in the Electromagnetic Spectrum

James takes a tour through the English countryside, while venturing into areas of the electromagnetic spectrum that may as well be labelled “Private Property. No Trespassing. Keep Out.”