Dom Christie

Tagged: css

📚 til

Didn’t strictly learn this today, but needed to note it down so I remember. scroll-padding applies to scroll containers; scroll-margin applies to scroll items.


Calling load() before play() on a media element is recommended when switching the src. Hopefully this fixes the occasional AbortErrors I’ve been seeing on iOS.

📚 til

:placeholder-shown CSS pseudo selector: could be really useful for conditionally displaying adjacent/sibling depending on whether the input has a value.


Customise how Ruby destructures an object by defining a deconstruct_keys method.