@shivan.xyz

Web Developer & Optometrist https://shivan.xyz

Just came in the post. I'm officially part of the club. The learning never stops, and I am open to some tips. What's next?

New Zealand Private Pilots license with some information removed.

What are some good ways to keep track of films watched and books read? For my site, I'm considering creating a new content type for books read and films watched.

Should dark mode be supported by web applications as a minimum? Warning video does have significant contrast switching.

Call me crazy (and also a little bit messy - dust appears 0.001ms after cleaning...), here are some items I have on my desk to create a sense of joy for work.

Accessories on a desk with numbers overlayed

Would it be useful (or even possible) to have duckduckgo !bangs for the svelte(kit) documentation?

Screen shot with 'svelte' in the search box showing no results for a list of duckduckgo bangs

Svelte pro tip: I surprised myself writing this very cool pattern You can make a prop be either an attribute or a snippet: very handy when you want to provide two "size variants" of the same content!

The component implementing it:
1) a prop with a union type `string | Snippet` imported from "svelte" (can be anything else than a string btw
2) with an `{#if}` block, check whether the prop is `typeof prop === "string"` to use it as a regular string, or wrap it in a `{@render}` block in the `{:else}` branch otherwise: easy!On usage, it's type-safe and flexible: the prop stays mandatory (if you declare it so), but can be used either as an attribute (`prop="content"`) or as a snippet with whatever you want inside!

A pen that writes and a watch that tells the time (and month and day). Am I crazy to appeal to the analogue?

A fountain pen shown with light. In the background is paper with the words handwritten: 'I got a new fountain pen!'An arm outstretched with an an analogue watch

the single biggest criticism svelte has received over the years is 'you can't have multiple components in a file'. so we fixed it! by making them unnecessary. with declaration tags (svelte.dev/docs/svelte/...), snippets/each blocks/etc can have their own state: svelte.dev/playground/a...

a screenshot of https://svelte.dev/playground/aaac159f0f73466bb3859dfed6792cab?version=latest, demonstrating state-in-snippets
Antoine@antleth.fr · 2mo ago

@const is dead, long live const! Svelte 5.56 allows for raw let/const ANYWHERE in the markup within {} brackets, deprecating {@const} This is huge! svelte-changelog.dev/pull/sveltej...

Here I want to demonstrate the benefit of `oklch` vs `hsl`. Each row is supposed to demonstrate the same applied "lightness". Is it obvious that for one swatch, the perceived brightness varies (hsl), but in the other it seems quite consistent (oklch)?

Two range pickers at the top with colours and shades. Underneath are colours of roughly the same perceived brightness arranged by colour and shade.Two range pickers at the top with colours and shades. Underneath are colours of showing a variety of perceived brightness that do not line up.

I am starting to write content and make short videos on things I learn in the dev space. They aren't particularly difficult or "interesting" topics so I wonder if it's still worth sharing these things or is it a waste of time?