Better HN
topnewbestaskshowjobs
Log inSign up

imfemambocus

7 karma · joined Aug 16, 2026 (3mo ago) · 13 submissions

Frontend developer in Luxembourg, previously Mauritius. Mostly TypeScript, React and Vue.

I work on data-dense application interfaces: tables, filter bars, command palettes, long forms. Side project is sley-ui.dev, a React/Vue component registry for that kind of screen.

github.com/imfemambocus

Submissions

1.

Show HN: Density-first components for React and Vue(sley-ui.dev ↗)

1 points · by imfemambocus · 3mo ago · discuss

comment 3mo ago · link · parent

This is the first time that I'm properly getting into theme switching, so I built the dark and light mode for my component library in the most obvious way that I could find. The goal is to transition background-color, border-color, color and box-shadow on every element. But this felt a bit slow and sluggish, so I used document.getAnimations() to see how many that actually runs, and the result is 3164 animations on a page of 1544 elements.

After some playing around, I found out that startViewTransition animates snapshots of the whole page instead, and that's 5 animations for the same job, with a gradient fading along with everything else rather than snapping. I did however find a React thing when using this function and it's that the new palette has to be in the DOM inside the callback which means the state update needs flushSync.

document.startViewTransition(() => { flushSync(() => setTheme(next)) })

I'm not sure this is the right way to do it, but I wrote down every number that I measured.

3.

My theme switch was running 3164 animations(sley-ui.dev ↗)

2 points · by imfemambocus · 3mo ago · 1 comment

comment 3mo ago · link · parent

AI or not, this is so cool! I like the visuals.

5.

A row window makes scrolling free and does nothing for the load(sley-ui.dev ↗)

2 points · by imfemambocus · 3mo ago · discuss

6.

Show HN: Sley UI, React components with one density knob(sley-ui.dev ↗)

1 points · by imfemambocus · 3mo ago · discuss

comment 3mo ago · link · parent

Snapchat is just on another level when it comes to screenshots.

"Forget watermarks, I'm just going to let the person know! Ha!"

comment 3mo ago · link · parent

This is a nice blog and it makes sense to me now. As a gamer and linux user myself, I've previously had to do tweaks and go-arounds without really understanding what was going on behind the scenes. :)

comment 3mo ago · link · parent

The one thing I would add to each swatch is where the number came from. A value read out of a palette table and a value sampled from a screenshot are not the same number, and the difference is invisible.

I ran into this today on something unrelated. A page painted #0b0d14, and macOS screencapture wrote rgb(8,13,16) into the file, because the capture lands in the display's colour space rather than sRGB. Handing that same hex to a video encoder gave a third answer, rgb(9,11,17), this time from the yuv conversion. I had to ask for #0a0f13 to get back the value the page had actually painted.

So any swatch sampled from a screenshot of a running install is drifted by a few levels, silently, and a CRT is a further step away again. One line per entry saying "documented VGA palette" or "sampled from a VM" would make this citable rather than just lovely to scroll, and it would settle the Windows 98 teal question in the sibling comment.