Burton Smith's Avatar

Burton Smith

@stuffbreaker.bsky.social

Fun-loving coder and speaker. I love web development, web components, and design systems. Creator of the WC Toolkit. I work at ZocDoc.

1,369 Followers  |  387 Following  |  915 Posts  |  Joined: 14.12.2023  |  2.2243

Latest posts by stuffbreaker.bsky.social on Bluesky

FOUC Demo - Baseline Baseline FOUC demo showing unstyled custom elements before definitions load.

I also created a new demo site to showcase each of the solutions:
break-stuff.github.io/ce-fouc-demo

08.02.2026 17:29 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
Reducing FOUC with Web Components Learn practical techniques for reducing the flash of unstyled content (FOUC) as your web components/custom elements are defined to improve your users' experience

I updated my article on reducing #WebComponent FOUC to include details on how to choose an appropriate timeout.

#html #css #javascript
dev.to/stuffbreaker...

08.02.2026 17:29 β€” πŸ‘ 6    πŸ” 1    πŸ’¬ 1    πŸ“Œ 0

I think it's needed for isolating things like credit card information, but you should be able to do OAuth without it.

06.02.2026 13:22 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
a man pointing to a sign that says believe ALT: a man pointing to a sign that says believe
06.02.2026 10:33 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

That's a cool idea! What's the iframe for?

06.02.2026 10:29 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Video thumbnail

Wild how far you can push "customizable select" with just #CSS

nerdy.dev/nice-select

03.02.2026 17:26 β€” πŸ‘ 347    πŸ” 63    πŸ’¬ 13    πŸ“Œ 1

One of things I love about it is that there are lots of different ways to author web components and the CEM acts as a translation layer for tooling and integrations.

04.02.2026 11:02 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I may have heard something about it... 😏

04.02.2026 01:28 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I think we need a better tool.

04.02.2026 01:03 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

There's definitely a place for SSRed web components, but I think trying to solve it with DSD is the wrong tool for the job most of the time.

- it requires special setup for each framework
- tools for it often restrict the APIs you can use
- it significantly bloats the DOM once it's rendered

04.02.2026 01:03 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Congratulations, fellas! That's an amazing achievement! I love listening in every week.

03.02.2026 11:01 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

+1 for declarative custom elements

02.02.2026 23:14 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0
Video thumbnail

Finally solving the tooltip arrow usecase with a new CSS property called border-shape

⚠️ WIP early-stage API, timeline TBD, more info coming soon

But it brings a lil tear to my eye to see this working, border & all πŸ₯²

This demo uses anchored container queries + border-shape + a little animation

30.01.2026 19:12 β€” πŸ‘ 124    πŸ” 13    πŸ’¬ 7    πŸ“Œ 3
Video thumbnail

TIL, Chrome 144 ships some new pseudo-classes. πŸ‘

Within limits, you can now style the matching strings of the "find in page" search.

::search-text {
// matching strings
}

::search-text:current {
// currently matched string
}

More on the blog. πŸ‘‡

www.stefanjudis.com/today-i-lear...

02.02.2026 14:07 β€” πŸ‘ 89    πŸ” 16    πŸ’¬ 6    πŸ“Œ 3

That was arbitrary. You can set it to anything. My example tends to load faster than the timeout, but I have a very fast network.

02.02.2026 18:38 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Yeah, that feels really heavy-handed when most design system use-cases can be improved with 9 lines of CSS.

To be honest, I think a better solution is needed.

02.02.2026 12:47 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I'm on board with most of this. I see a couple of potential issues with your slots argument:

- Performance could be an issue
- Styling slotted content will be unpredictable
- What happens if you have nested components that use the same slot name?

02.02.2026 12:01 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Yeah, unfortunately using declarative shadow DOM as an SSR solution is a pretty ugly hack and overkill in many web components use-cases.

02.02.2026 10:27 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I would be interested to read that. I personally really like web components, but would like to understand where you see friction points.

02.02.2026 02:01 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

I think this is an area where declarative custom elements would be a massive win.

02.02.2026 01:24 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Yep! Any time you render with JavaScript you end up with it. Even frameworks have it. πŸ€·β€β™‚οΈ

02.02.2026 00:12 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

So, like a reverse FOUC? Do you still have hidden things when these things are shown?

01.02.2026 20:19 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Ah, I see. Shouldn't everything show after the timeout?

01.02.2026 12:03 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I could see something like this working well with components that are loaded after the initial page loads.

01.02.2026 11:45 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

There are a few challenges with these approaches:

- these are at the individual component level which will result in layout shifts as they are defined and painted
- these are fading in rather than appearing which will negatively affect the core web vitals score

01.02.2026 11:45 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Good question! To handle something like that, I would imagine you would need an indicator on your components that they have completed loading.

01.02.2026 00:28 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
Reducing FOUC with Web Components Learn practical techniques for reducing the flash of unstyled content (FOUC) as your web components/custom elements are defined to improve your users' experience

I've had a lot of questions about it, so I wrote up a quick explainer on different ways to reduce FOUC with web components.

dev.to/stuffbreaker...

01.02.2026 00:09 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
body:has(:not(:defined)) {
  opacity: var(--wc-loaded, 0);
  animation: showBody 0s linear 100ms forwards;
}

@keyframes showBody {
  to {
    --wc-loaded: 1;
  }
}

body:has(:not(:defined)) { opacity: var(--wc-loaded, 0); animation: showBody 0s linear 100ms forwards; } @keyframes showBody { to { --wc-loaded: 1; } }

I've been having fun with improving this FOUC solution for #WebComponents. Thank you, everyone, for the feedback!

I've improved upon it.

01.02.2026 00:08 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 3    πŸ“Œ 0

Can you explain more about your hidden state override?

31.01.2026 11:38 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
Do You Need to SSR Your Web Components? Many front-end frameworks use server-side rendering to improve their app's performance, but do web components need to be SSRed?

My components use JS, but I was looking for a CSS way to reduce FOUC. In an article I posted a while back, I showed how this can be handled using JS, but I was looking for more performant ways to handle the problem.

dev.to/stuffbreaker...

30.01.2026 14:46 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

@stuffbreaker is following 20 prominent accounts