You (and Claude) have been styling pill buttons wrong all along.
Fair warning: this one gets VERY nerdy π€
Round ends steal space from the text and push the icon off-center. Here's the CSS that fixes both, with a bit of Ο.
These are my top resources for getting design inspirations
1. https://t.co/bSVecGEn1i - the best real-time Three.js sites in one gallery
2. https://t.co/v1qegZUbae - a daily curation of design, websites and tools
3. https://t.co/PqKNimjObG - real screens and flows from shipped apps and sites
4. https://t.co/rtCfqeZnOP - Three.js landing pages, components and shaders
5. https://t.co/4YuWUJbDtR - hand-picked interfaces, sorted by component
6. https://t.co/Xaa31pHZ4z - the best new sites every day, picked by a jury
This is f*cking insane. Anthropic engineer:
"You're not supposed to prompt Opus 5.5
You're supposed to build a system that prompts itself. At Anthropic, 90% of our engineers have already built these systems"
In 30 minutes, she walks through exactly how Anthropic builds agents that remember, fix their own mistakes and get sharper with every run.
Better than any $1000-$2000 agent course I've seen.
Watch it, then read the article below β
small UI motion tip:
don't always map cursor movement directly to your UI.
πππππ π‘ = ππππΌππππππ ππππ(πΆ)
πππππ πππππππ = πππππππππ(π‘, {
πππππππππ: π·πΎπΆ,
πππππππ: πΈπΆ
})
ππππππ <ππππππ.πππ πππ’ππ={{ π‘: πππππππ }} />
instead of the element instantly following x, useSpring gives it a bit of weight and inertia.
works really well for cursors, drag interactions, parallax and elements following the pointer.
css tip: tooltips that know when theyβre about to get clipped.
new way (flips automatically):
.trigger {
anchor-name: --tip;
}
.tooltip {
position: fixed;
position-anchor: --tip;
position-area: right;
position-try-fallbacks: flip-inline, flip-block;
}
old way (gets cut off near edges):
position: absolute;
left: 100%;
translate: 0 -50%;
css tip π - the same :ππππππ-πππππππ gives you a scrollspy with no js.
.πππ {
ππππππ-ππππππ-πππππ: ππππ;
}
.πππ π:ππππππ-πππππππ {
ππππππππππ: πππππ;
πππππ: π ππππ;
}
each <π ππππ="#ππ"> in .πππ tracks its section. the link for the section in view matches :ππππππ-πππππππ and follows as you scroll.
design tip π² - size icons with π·πππ, not ππ‘.
π·πππ is the height of a capital letter in the current font, so the icon tracks the text at any size:
.πππππ {
πππππππ’: ππππ‘;
πππππ-πππππ: ππππππππ;
}
.πππππ πππ {
πππππ-πππ£π: π·πππ;
}
ππππππππ sits the icon on the text's baseline, so it spans the caps in any font. the width follows the ππππ π±ππ‘.
not every CSS animation needs to be smooth.
.ππππππ {
πππππππππ: ππππ π·π πππππ(πΎ) ππππππππ;
}
πππππ() splits the animation into discrete jumps instead of continuously interpolating it.
really useful for sprite animations, counters, clocks and frame-by-frame effects.
css tip β
use ππππ ππππππ on a row that can overflow.
with plain center, a row wider than its box spills off both sides.
ππππ ππππππ centers while it fits and starts at the left edge when it doesn't:
.ππππ {
πππππππ’: ππππ‘;
πππππππ’-πππππππ: ππππ ππππππ;
ππππππππ -π‘: ππππ;
}
"Almost every software development organization has at least one developer who takes tactical programming to the extreme: a tactical tornado. The tactical tornado is a prolific programmer who pumps out code far faster than others but works in a totally tactical fashion. [...] In some organizations, management treats tactical tornadoes as heroes.
"However, tactical tornadoes leave behind a wake of destruction. They are rarely considered heroes by the engineers who must work with their code in the future. Typically, other engineers must clean up the messes left behind by the tactical tornado, which makes it appear that those engineers (who are the real heroes) are making slower progress."
@JohnOusterhout, A Philosophy Of Software Design, 2018
Sound familiar?