make your inline icons resilient to wrapping.
avoid flex + items-center.
vertically align SVG with height="1lh" and size with width.
https://codepen.io/editor/alexcarpenter/pen/019ff69c-0252-7405-84c4-a61eff18d6ec
make your inline icons resilient to wrapping.
avoid flex + items-center.
vertically align SVG with height="1lh" and size with width.
https://codepen.io/editor/alexcarpenter/pen/019ff69c-0252-7405-84c4-a61eff18d6ec
favorite resources on composition:
Agentic tool stack recently:
/plannotator-review has been such a big improvement to reviewing lots of agent written code recently.
active transform scale, I want to love you.. I do, as its such a nice piece of feedback for pressed state.
but we really need the ability to scale by px value.
button:active {
transform: scale(calc(100% - 6px));
}colordx.dev
A high-performance color library with extended support for modern color spaces including OKLCH, OKLAB, Display-P3, and more.
mattrothenberg.com
<svg viewbox="0 0 16 16" width="32">...</svg>
<svg viewbox="0 0 16 16" height="32">...</svg>
Setting only width or height scales the icon along that axis. Along the other axis, the icon centers itself in whatever space its container gives it via the default preserveAspectRatio=“xMidYMid meet”, instead of stretching to fill it.
Helpful for aligning icons with text with height="1lh".
I’ve never been a fan of a seperate <IconButton /> component. Finally landed on what feels like a nice naming scheme.
<button shape="square">
<Icon />
</button>
<button shape="circle">
<Icon />
</button>
Shape supports default | square | circle options where square and circle both removes the inline padding and sets the aspect-ratio to 1/1.
.btn {
height: 2rem;
padding-inline: 0.625rem;
}
.btn:is([data-shape="square"], [data-shape="circle"]) {
padding-inline: 0;
aspect-ratio: 1 / 1;
}x.com/thomas_sweet
@property --scheme-probe {
syntax: "<color>";
inherits: true;
initial-value: white;
}
.card {
--scheme-probe: light-dark(white, black);
}
@container style(--scheme-probe: black) {
.swatch {
border-style: dashed; /* any property */
}
}yeptype.com
tenphi.me
thecultureslop.com
github.com
Tailwind CSS v4 squircle (superellipse) corner utilities with visual radius correction.
datavolve.psdcoder.dev
Datavolve is a tiny, type-safe TypeScript library for versioning persisted client data, safely evolving old localStorage, IndexedDB, or JSON state to the current shape through forward-only transforms with zero dependencies in 258 bytes.
twilson.net
github.com
Migrating to CSS logical properties for RTL support, so layout, spacing, borders, and positioning mirror correctly across locales.
<Box
sx={t=> ({
marginRight: t.space.$1,
marginInlineEnd: t.space.$1,
})}
/>
ESLint rule prevents physical left/right CSS from creeping back in.
developer.chrome.com
The Advanced Perceptual Contrast Algorithm (APCA) contrast calculator has officially left its experimental phase and is now available as a standard preference setting. APCA replaces the legacy AAA/AA contrast guidelines with a modern perceptual contrast model optimized for modern displays and text rendering.
moultano.wordpress.com
pqina.nl