← All topics

Small Print

All writing →

15 posts filed under Small Print, newest first.

2 min

light-dark()

Two color values in one declaration, picked by the color scheme, which removes most of the reason a theme needed a second block of custom properties at all.

CSS Small Print
2 min

scrollbar-gutter

The layout shifts by fifteen pixels when a modal opens, everybody blames the modal, and the actual cause is the scrollbar disappearing along with it.

CSS Small Print
2 min

aspect-ratio

The padding-top percentage trick is dead and has been for a while, replaced by one declaration that says the thing it means.

CSS Images Small Print
2 min

Intl.NumberFormat

Currency formatting is in the browser, has been for years, and is still being done with a hardcoded dollar sign and a call to toFixed in most of the code I read.

JavaScript Small Print
2 min

AbortController

The thing everybody knows as the way to cancel a fetch is also the tidiest way to remove a pile of event listeners, and the second use has changed more of my code than the first.

JavaScript Small Print
2 min

:is() and :where()

Two selectors that look interchangeable in every example anybody writes, and differ on the one thing that actually causes problems later.

CSS Small Print
2 min

git reflog

Almost nothing is actually gone after a bad reset, because git keeps a local log of everywhere HEAD has pointed for the last ninety days and hardly anybody knows to look at it.

Git Small Print
2 min

git bisect

Halving a commit log is a mechanical process that finds a regression while you make coffee, and the only genuinely hard part is writing down what you are looking for before you start.

Git Debugging Small Print
1 min

optgroup

A select with 40 options in it is nearly always a select that wanted three or four labeled groups, and the element for that has been sitting in HTML the entire time.

HTML Forms Small Print
2 min

abbr and the title attribute

The abbreviation element is one of about four places in HTML where the title attribute is the actual content rather than a decoration, and it is still unreachable for anybody not holding a mouse.

HTML Accessibility Small Print