Stephen Margheim's Avatar

Stephen Margheim

@fractaledmind.bsky.social

1,422 Followers  |  190 Following  |  710 Posts  |  Joined: 23.04.2024  |  1.7985

Latest posts by fractaledmind.bsky.social on Bluesky

Will release next week

21.01.2026 08:30 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Relapsing the initial version soon. Got slowed down hosting my brother in Berlin this last week. But back at it now

21.01.2026 08:30 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

After 11 long years, I am finally back in a square year. Looking forward to being 36!

19.01.2026 13:28 โ€” ๐Ÿ‘ 6    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0

You can override the selector for any TW variant. For example, TW now has the hover variant use both :hover and media(pointer: fine). I always want these higher order utilities to produce the same result as if the person slapped all of these lower level utilities on the element(s). Ergoโ€ฆ

15.01.2026 12:18 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Ahhhhโ€ฆ Iโ€™m betting you have the 1Password browser extension, right? I canโ€™t believe this isnโ€™t fixed yet, but it is breaking syntax highlighting on every site. Was reported like 3+ weeks ago!

15.01.2026 12:16 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Aaron is one of the best educators I have ever met. I am 100% certain that this will be some of the very best content out there for harnessing AI to build, fast but with quality. I'm pre-purchasing, what about you?

14.01.2026 22:45 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Tooltips. Dropdowns. Popovers. Context menus.

All that JavaScript you wrote to keep things in viewport? Delete it.

The platform keeps winning.

13.01.2026 22:10 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Best part: automatic fallbacks.

.popup {
position-area: block-end;
position-try: flip-block;
}

Popup below the anchor. Not enough space? Flip it above. The browser does the math. You write the rules.

13.01.2026 22:10 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
Alignment in Anchor Positioning using position-area An interactive demo to understand how to control the alignment using the position-area property

`position-area` places your element on a 3ร—3 grid around the anchor, where `block-end` = below and `span-inline-end` = aligned right, can grow left, etc.

Play with it interactively: css-tip.com/position-area/

13.01.2026 22:10 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Step 1: Name your anchor

.trigger {
anchor-name: --menu;
}

Step 2: Connect and position

.popup {
position: absolute;
position-anchor: --menu;
position-area: block-end span-inline-end;
}

The popup now tracks the trigger.

13.01.2026 22:10 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

CSS Anchor Positioning is now baseline.

Firefox 147 ships today with full support. Chrome, Edge, Safari โ€” all on board. Position elements relative to other elements. No JavaScript.

Here's the 60-second rundown...

13.01.2026 22:10 โ€” ๐Ÿ‘ 14    ๐Ÿ” 3    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Tailwind v4โ€™s @โ€‹utility, @โ€‹apply, and @โ€‹variant arenโ€™t just new syntax.
Combined with :where(), they let you write semantic CSS thatโ€™s discoverable, tree-shakeable, readable, and composable.

Full write-up: fractaledmind.com/2026/01/02/...

12.01.2026 22:08 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

The ui- prefix matters too. When you see .btn you have no idea what youโ€™re dealing with. Bootstrap? Old semantic class? Random utility? `ui-badge` signals intent: zero-specificity visual pattern designed to compose with utilities.

12.01.2026 22:08 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Why this is better:
โ€ข @โ€‹utility โ†’ tree-shaking + autocomplete
โ€ข :where() โ†’ zero specificity, utilities always win
โ€ข @โ€‹variant โ†’ each state gets its own readable block
โ€ข @โ€‹apply โ†’ uses the userโ€™s theme, not a parallel system

12.01.2026 22:08 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0

@โ€‹utility ui-badge {
:where(&) {
@โ€‹apply inline-flex items-center ...;

@โ€‹variant hover {
@โ€‹apply bg-primary/90;
}

@โ€‹variant focus-visible {
@โ€‹apply border-ring ring-ring/50;
}
}
}

12.01.2026 22:08 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Building HTML UI forced me to figure out how to write CSS classes that integrate deeply with Tailwind v4. I want 3 things: intellisense, tree shaking, and easy utility overrides. Hereโ€™s I make it all work ๐Ÿงต

12.01.2026 22:08 โ€” ๐Ÿ‘ 4    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

How It Works (3/3)

* Opening: cubic-bezier(0.34, 1.56, 0.64, 1) โ€” 56% overshoot for energy
* Closing: cubic-bezier(0.34, 1.18, 0.64, 1) โ€” 18% overshoot, gentler

10.01.2026 17:04 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

How It Works (2/3)

* Trigger: Inside the container (is this ok, I don't know, but it works ๐Ÿคท๐Ÿป), fades/blurs out when :popover-open
* Content: Inside the container, fades/blurs in when :popover-open
* Height: Animates to auto using interpolate-size: allow-keywords

10.01.2026 17:04 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

How It Works (1/3)

* Container: The popover is always visible (display: flex), acting as the morphing container
* Popover API: popover="auto" for light dismiss โ€” click outside or press Escape to close
* Anchor positioning: Container anchors to wrapper using anchor() functions

10.01.2026 17:04 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Video thumbnail

As soon as I saw the Bloom component from Josh Puckett, I knew I had to build it with plain HTML and CSS. This one was tricky, I won't lie, but a lot of fun.

May just add this as an affordance to HTML UI, we shall see.

10.01.2026 17:04 โ€” ๐Ÿ‘ 10    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Affordances are a natural solution. They give us reusable visual patterns that work with any element, compose cleanly with utilities, and provide a single source of truth for how interactive elements should look.

09.01.2026 20:26 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

What if you want a file input where the label looks like a button? Or a link that should look like a button? Or a summary element that should look like a button? Forgive me, but this ain't it:

<Button render={<a href="/contact" />}>Contact</Button>

09.01.2026 20:26 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Your app should have consistent visual styles for the various UI affordances so that users can build a stable mental model of how to interact with your system.

BUT, you might not want or need to use the exact same HTML structure for every UI affordance.

09.01.2026 20:26 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Buttons are those things that afford users the ability to take an action.
Selects are those things that afford users the ability to choose an option.
Dialogs afford users the ability to double check their intention.
Popovers afford seeing contextual information.
etc.

09.01.2026 20:26 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

We don't need to go back to trying to come up with a semantic name for every part of our pages to nonetheless benefit from a small collection of well-named classes.

Look at the popular component kits. You'll see the same names; there's a shared vocabulary for web apps.

09.01.2026 20:26 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

These are the core conceptual layers of frontend development today:

> tokens - atomic design values
> utilities - single purpose presentational classes
> components - bundled structure + behavior

I believe we are missing a layer โ€”ย affordances

fractaledmind.com/2025/12/01/...

09.01.2026 20:26 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Let me know if you ever want to chat HTML and CSS on Deadcode ๐Ÿ˜‰

I have some thoughts on how we can really start to delete some code by embracing the power of the modern web platform

09.01.2026 16:49 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Video thumbnail

Same olสผ <dialog>, completely new CSS.

HTML UI will have dialog sheets inspired by Silk React components.

No JS, no swipe gestures, but still gorgeous sheets with elegant animations. Just a <dialog class="ui-sheet"> away โœจ

08.01.2026 22:25 โ€” ๐Ÿ‘ 16    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Tell me how you define surface background colors and Iโ€™ll give you a tweaked version to demonstrate

06.01.2026 21:07 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

If you use _only_ an offset (like in example one), yes. The problem arises when you need to have an offset shadow. In my example, that is to create a two-part focus ring with an offset border and then a lighter ring.

06.01.2026 20:56 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

@fractaledmind is following 19 prominent accounts