

Covers that change with your theme
My site has seven colour themes, but a cover is one image. An AI model paints the light in two colours I never show, a script turns them into masks, and CSS recolours it to match the theme.
35 posts with this tag.


My site has seven colour themes, but a cover is one image. An AI model paints the light in two colours I never show, a script turns them into masks, and CSS recolours it to match the theme.


My code blocks used to carry a style attribute on every word, written by Shiki from a theme file. Now twinkleplop gives each token a class and the site's CSS colours it. I compared the two builds character by character before keeping it.


Three scroll-driven animations on my Devlog timeline, no JavaScript: a line that fills as the middle of the screen passes it, entries that wipe in, dots that pop. And the one inset trick that makes the line follow your reading.


Full screen on a big monitor, my pages were a narrow strip. Wider pages, a reading column that keeps 80 characters a line but grows, a text size control that's restored before the first paint, and one font fewer.


My light theme was the dark one with the lights on. The first fix was too loud; comparing three directions with screenshots found the right one, ink green on warm white, and a test makes sure the grid never takes text below 4.5:1.


My footer now opens a panel about me and how to hire me, with a top card that changes look every time: a terminal, a spotlight, a business card, an open-to-work card and an ID card in 3D. How each one works, and how to keep five effects calm.


My site's background is a blueprint grid that lights up around the mouse. It looked great and read badly. How I found every piece of text sitting on it, and the one rule that fixed them all.


Click a post card and its title, picture, date and tags fly into their places on the post. How view-transition-name pairs two elements across a navigation, and the four things that made it look right.


My blog page opened with a wall of 55 tag links. Now it's a sidebar of coloured chips, most used first, that fades out into a button, and what fades out is really gone for the keyboard too.


My site now has six colour themes, from Tokyo Night to Solarized. Each is one CSS file, no component changed, and a unit test checks every theme's contrast.


My background grid lights up around the mouse. Where it ran under text, the text dropped to 1.89:1. How I measured a translucent layer, and how I picked the strongest effect that still passes.


A collapsible section that works without JS, opens by itself as you scroll, respects what you chose, and doesn't hide its content from find in page.


One line of CSS made every page change in my SvelteKit site glide up from wherever the last page was scrolled. The fix is a data attribute and two navigation hooks.


My about page now filters skills by the kind of job I'm applying for. One choice at a time means radio buttons, and :has() lets me style them without giving up what the browser does for free.


My CV builder makes its PDF with the browser's own print dialog. A print stylesheet, the light theme on paper, and a page title that becomes the file name.


The effects on my about page, and the bugs behind each one. An animation that never animated, an observer that never saw, and 168 KB of duplicate SVG.


Every logo on my about page keeps its brand's hue but takes its lightness from the theme, with a little OKLab math and CSS relative colors.


Highlighting code blocks at build time with Shiki, and a small TextMate theme whose colors are CSS variables, so code follows my site's themes.


Reading CSS custom properties in the browser, turning any CSS color into sRGB with a canvas, and the light-dark() surprise along the way.


Wrapping long lines, numbering them with a CSS counter and adding a copy button that only shows up when it works, around Shiki's HTML.


Where to learn how Svelte styles components, from the official tutorial to videos, plus the playground experiments that finally made scoped styles click for me.


What the Svelte compiler does to a component's style block, why a page's styles couldn't reach my rendered markdown, and when :global() or a global class is the right fix.


My home page keeps the intro in view while the sections scroll past, and a small nav shows which section you're reading. position sticky, a few lines of measuring on scroll, and proximity snapping that only applies to one page.


Animations that follow the scroll instead of the clock, in pure CSS. A header that lifts into a floating bar, a footer that slides in, and a hint that there's more below, all with a fallback for older browsers and reduced motion.


View transitions between routes with onNavigate, a nav marker that slides to the new page, and a typed way for each route to tell the root layout how to arrange it.


I replaced Open Props' grays with my own blue-gray scale in oklch, picked a terminal green, and designed the dark theme first. Why oklch makes a scale even, and what "dark first" means in light-dark().


A graph-paper background made of four gradients, plus marks drawn with a mask, and a spotlight that lights up the grid around your mouse. One fixed layer, no images, and it follows the theme.


My theme toggle became a sun that turns into a moon, and the new theme now grows out of the button in a circle. An SVG mask, one number token, and the View Transition API.


Fira Code for code, a handwritten font for my dev log and the system font everywhere else. No Google Fonts, no extra cost on pages that don't use them.


Card grids that pick their own column count, a hero that adapts to its container instead of the screen, and a header that rearranges itself with grid areas.


Why my hero component doesn't animate itself, how the page passes it animations as CSS props, and a reduced-motion safety net that actually covers delays.


Dark mode for my SvelteKit portfolio. Theme colors live in tokens.css using color-scheme and light-dark(), and a toggle overrides the OS setting.


How @layer lets me decide once which global styles win, and why my Svelte component styles beat all of them without extra effort.


Why my components use --text-1 instead of --gray-8, and how a small tokens.css made dark mode a one-file change.


How I set up Open Props with postcss-jit-props in a SvelteKit 3 project. The config goes in vite.config.ts, and I explain why CSS needs a plugin to do tree-shaking.