Published: September 10, 2021 at 8:43 PM

HTML5 container element flow chart


Published: September 7, 2021 at 1:15 PM

Shapes made with pure CSS


Published: September 6, 2021 at 6:56 PM

iOS prevents changes to volume property of <audio> and <video> elements

When creating custom interfaces around the HTML5 <audio> and <video> elements, make sure you hide the volume control if the user is on iOS. According to Apple's documentation, the volume property of <audio> and <video> elements is read-only, and always returns 1:

On iOS devices, the audio level is always under the user’s physical control. The volume property is not settable in JavaScript. Reading the volume property always returns 1.

iOS-Specific Considerations for Safari HTML5 audio and video, under the "Volume Control in JavaScript" section.

Published: August 18, 2021 at 12:11 AM

A pure ESM package

A gist by Sindre Sorhus that explains a lot about ESM. I first saw this linked to from react-markdown's v7.0.0 change log, but it's probably a good document to link to from any pure ESM package.

Here's the gist: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

Published: August 17, 2021 at 11:54 PM