Sam Potts
banner
sampotts.dev
Sam Potts
@sampotts.dev
Design Engineer. Father of two boys. Built plyr.io.
Currently: Released.so,
Previously: Amazon, Search.io, Selz (acquired by Amazon).
sampotts.dev
Has anyone run benchmarks of a front end builds on M1 vs M4? All the YouTube videos seem to be based around video encoding benchmarks which is great for... YouTubers. Single core looks to be almost a 100% improvement so in theory, builds should be quicker?
November 27, 2024 at 3:21 AM
I wasn't really famous on Twitter but did ok on GitHub by building a media player (plyr.io) about 10 years ago that gained some traction and is at almost 27k stars. Having kids kinda killed any spare time I had for it so it's been a bit dormant. Hoping to work on Vidstack (vidstack.io) one day.
November 13, 2024 at 3:16 AM
A little snippet to add some vibrancy to the Tailwind gradient helpers using oklch colors. This avoids the muddy grey you often get in some gradients.

1st is before, 2nd is using oklch. Miles nicer. You can read more about it in @joshwcomeau.com's article here: www.joshwcomeau.com/css/make-bea...
November 12, 2024 at 12:57 AM
I needed to monitor for changes to `color-scheme` in an embed and found this super handy little library. It needs `transition-behavior: 'allow-discrete'` which has ~73% support. I wrote a small fallback using polling for the older browsers but luckily support for `CSS.supports` is pretty decent!
bram.us Bramus @bram.us · Aug 30
Introducing @​bramus/style-observer, a MutationObserver for CSS.

It allows you to attach JavaScript callbacks to changes in computed values of CSS properties.

🔗 bram.us/2024/08/31/i...
November 7, 2024 at 1:10 AM
Is there an ideal way to do theming in Next.js? We have two themes which each have entry points that we import based on user settings. We then render via `page.tsx` files in the app directory. The issue we run into is somehow we end up with styles from both themes at once.

cc @leerob.com
November 7, 2024 at 1:00 AM