A predicate returning `x is T` teaches the compiler what a runtime check proved.
Author
Snippets posted by chris
Composes the built-in helpers rather than writing a second interface that will drift from the first.
Assigning to never makes the compiler fail the build when a new union member is added and left unhandled.
unknown forces a parse step rather than letting an any spread silently through the codebase.
`as const` keeps the literal types, so the derived union is the actual keys rather than string.
Grid is one line. Flex is three and gives you control over the axes separately.
auto-fill with minmax reflows on its own, so the column count follows the container rather than a breakpoint list.
Ellipsis after two lines. The -webkit- prefixes are still required despite being supported everywhere.
One rule that disables animation for people who asked their system for less of it.
Hides a label from sight while leaving it in the accessibility tree. display:none would remove it from both.
The label is tied to the input by id, and the hint is announced with it via aria-describedby.
srcset lets the browser pick; sizes tells it how wide the image will actually be rendered.