A Clock That Doesn't Snap
ethanniser.dev
ethanniser.dev
jakub.kr
Another use case for absolute positioning elements within inline text to support hanging punctuation.
Supports varying sizes of text, without the need for custom negative text indent values.
<p class="relative inline-block">
<span class="absolute right-full">“</span>Lorem ipsum dolor sit amet
consectetur adipisicing elit. Iste officia quasi fugiat, dolores ab nam
repellendus voluptate”
</p> silkhq.com
Native‑like swipeable sheets on the web
github.com
A lightweight React Hook intended mainly for AI chat applications, for smoothly sticking to bottom of messages.
Ensure the trailing icon never orphans itself on to a new line. Paired with the icon alignment technique I shared last week to vertically center it.
<p class="relative inline-block pr-[1.25em]">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quia, ducimus
<span class="absolute ml-[.25em] inline-flex h-[1lh] items-center">
<Icon name="arrow-up-right" class="size-[1em]" />
</span>
</p>
Picked this tip of from John Phamous some time ago.
My current favorite approach to building bullet proof icon alignment within list items. Ensures icons are always vertically aligned to the first line of text, and ensures the icons do not shrink when text wraps to two lines.
<ul>
<li class="flex gap-2">
<span class="flex h-[1lh] items-center">
<Icon class="size-[1em] flex-none" name="badge-check" />
</span>
List item 2 that is longer than the others and wraps to two lines
</li>
</ul>
With this approach, you can apply a font size to the list item, and the icon will scale accordingly.
clerk.com
npx shadcn@latest add https://clerk.com/r/nextjs-quickstart.json
This single command will install:
For when <mark /> elements wrap to multiple lines, use box-decoration-break: clone; to render each fragment with their own specified border, padding, and margin.
mark {
box-decoration-break: clone;
padding-inline: 0.25rem;
} Using background-repeat: round; to get that repeated dot background to fit perfectly across differing viewport widths.
div {
background-image: radial-gradient(red 1px, transparent 1.3px);
background-size: 24px 24px;
background-position: 0 0;
background-repeat: round;
} Had a quick chat with Hamed about the recent work we have done to improve the customization of Clerk UI components. Watch it on YouTube.
Your component library ships bundled CSS via CSS-in-JS. You want folks to opt in to being able to toggle between light/dark mode but you don’t know how they are handling toggling between light/dark.
Use CSS var toggle hack?
/* Component library styles */
:root {
--dark-mode: ;
}
button {
padding: 1rem;
background-color: var(--dark-mode, white) black;
color: var(--dark-mode, black) white;
}
/* User styles turn on dark mode */
.dark {
--dark-mode: initial;
}
@media (prefers-color-scheme: dark) {
:root {
--dark-mode: initial;
}
}
This gives the user the ability to enable dark mode based on how they have their app configured. @media query, class, data-attr, etc.
They can even be very targeted on which components this is enabled for.
clerk.com
We shipped a new Clerk theme based on shadcn/ui that styles Clerk’s components according to your shadcn/ui theme.
paulgraham.com
Here’s a simple trick for getting more people to read what you write: write in spoken language.
chsmc.org
www.jonasbrinkhoff.com
www.youtube.com
zed.dev
Software development is changing and we find ourselves at a convergence. Between the extremes of technological zealotry (“all code will be AI-generated”) and dismissive skepticism (“AI-generated code is garbage”) lies a more practical and nuanced approach—one that is ours to discover together.
clerk.com
Theme your Clerk components directly from your CSS files where your design tokens live – no more CSS-in-JS required.
:root {
--clerk-color-primary: #6d47ff;
}
We learned from our own experience: the variables appearance option had limited adoption because it was hard to integrate with existing design systems. Even we had to use workarounds with elements prop + Tailwind classes in our dashboard.
Now you can theme components where your tokens are already defined. Plus we’ve improved variable naming and added new ones like colorRing, colorMuted, and colorShadow for more flexible theming.
www.youtube.com