A hiker in a yellow jacket and beanie stands on a rocky summit, seen from behind, looking down over a wide valley with a town in the distance and a long mountain range beyond; the low sun is warm and soft diagonal streaks of light cross the frame

Now We Can Do “Full Bleed”

Photo by Matheo JBT on Unsplash

I have wanted to have full bleed images on the blog for a while but it was always one of those “I’ll get around to it” things. Today I used my local AI (Qwen 3.8 27B) to add it to my Notes Editor (my blog authoring & publishing app) and I think it has worked out nicely.

The rules

It was important to me that I be able to overlay the post title and meta-data atop the image and these texts had to be readable regardless of the image itself and the light/dark mode switch of the website. Another rule I set was that the photo stays untouched. Whatever the masthead needs, it has to get without touching the image.

Two wrong answers

The obvious answer to text on a photo is to make the background darker where the text sits. That is the scrim, it is what I built first. Over a calm photo it is fine. Over the photos I actually choose, it looks like the photo has been graded, and the point of the photo is gone.

The other answer is a solid card. A plain light card over the photo is opaque, and an opaque card is a box sitting on the picture, which is worse than a filter, not better.

What I wanted was something that behaved like frosted and tinted glass. The photo is still there, you can see it, it is just not sharp where the text is.

Glass

There is a recipe I had bookmarked on css-tricks for exactly this: a tint and a blur applied to the background by the browser’s own backdrop filter. I took the blur from the site’s nav, which already frosts whatever scrolls under it, and I added a saturate. A plain blur washes the colour out to grey, and these photos are chosen for their colour, so the card pumps the saturation back up before it blurs. The photo behind the card is darker and softer and more coloured than the photo around it.

The tint does the legibility work. It is black at 0.6, which lets 40% of the photo show through.

Doing the maths

The worst possible pixel behind white text is a pure white pixel behind the glass. A dark pixel only helps, so if the white case clears, every case clears. White is 255. The glass passes 40% of it, so the worst case behind the text is 255 × 0.4 = 102, a mid grey. White text on that is a 5.7 to 1 contrast ratio, and the AA threshold the web has settled on is 4.5 to 1. It clears with margin, on every photo, in both themes, because the text sits on the glass and not on the page.

The calculation also reveals what does not work. Drop the tint below about 0.535 and the white case falls under the threshold. And the light version of the trick, a white glass at 0.12 or 0.15, only works over a dark photo, which means every photo has to be vetted before it ships. A dark glass at 0.6 does not care what is behind it.

The details follow the same arithmetic. The site’s brand blue sits at 1.8 to 1 over that glass, which is not legible, so the caption links in the card are white and underlined. The card’s hairline is a soft white, because the page’s border colour vanishes on the dark fill. And on a phone, where the column sits close to the window edge, the card drops its offset and sits flush, so the title still begins on the same line as the body text.

The lift

On the page itself the mechanics are small. A post whose body opens with the hero div has its header lifted into the card by the build, the top padding the nav height reserves goes away, and the photo butts up against the top edge of the window. This is the first post to carry it (although I will not rule out my going back and selectively retro-fitting this to some previous posts.)

The part I am really pleased about is the other half. The Notes Editor’s live preview now renders the same lift, so while I am writing a post I see the masthead the reader will get, and I can tell at a glance whether my chosen image can carry it. The preview and the published page run the same code, which means there is no gap between what I see and what deploys to the production website.

For the reader

You get the photo the way it was chosen. The title sits in a pane of glass in front of it, not painted onto it. Look closely and you can still see the photo through the card, blurred and colour-balanced to the image itself. That is the whole design: the text is legible because the glass is dark, and the photo is untouched because the glass is in front of it. Nice.