Jeremy Keith

Jeremy Keith

Making websites. Writing books. Hosting a podcast. Speaking at events. Living in Brighton. Working at Clearleft. Playing music. Taking photos. Answering email.

Journal 2788 sparkline Links 9164 sparkline Articles 78 sparkline Notes 5954 sparkline

Wednesday, June 16th, 2021

Tuesday, June 15th, 2021

Monday, June 14th, 2021

In search of the new

Robin asked a question:

What is a work of science fiction (a book, not a movie, thanks) that could only have been written in the last ten years? AND/OR, what’s a work of science fiction that hinges on experi­ences and feelings new in the last ten years? AND/OR, what’s a work of science fiction that repre­sents the current leading edge of the genre’s specu­la­tive and stylistic devel­op­ment?

The responses make for interesting reading, especially ahead of Wednesday’s event.

Here’s how to use the new :has selector in @TailwindCSS. This also shows how you can use older pseudo-classes like :nth-child and :nth-of-type in Tailwind (and it applies to using the adjacent sibling selector too):

You can’t.

Look at this fantastic shot of Jupiter and the Galilean moons taken by @AstroBrighton’s Ivana Peranic at 3am this morning: Jupiter, Io, Europa, Ganymede and Calisto all lined up like a string of pearls!

Look at this fantastic shot of Jupiter and the Galilean moons taken by @AstroBrighton’s Ivana Peranic at 3am this morning: Jupiter, Io, Europa, Ganymede and Calisto all lined up like a string of pearls!

Sunday, June 13th, 2021

Saturday, June 12th, 2021

Thursday, June 10th, 2021

Doing the right thing for the wrong reasons

I remember trying to convince people to use semantic markup because it’s good for accessibility. That tactic didn’t always work. When it didn’t, I would add “By the way, Google’s searchbot is indistinguishable from a screen-reader user so semantic markup is good for SEO.”

That usually worked. It always felt unsatisfying though. I don’t know why. It doesn’t matter if people do the right thing for the wrong reasons. The end result is what matters. But still. It never felt great.

It happened with responsive design and progressive enhancement too. If I couldn’t convince people based on user experience benefits, I’d pull up some official pronouncement from Google recommending those techniques.

Even AMP, a dangerously ill-conceived project, has one very handy ace in the hole. You can’t add third-party JavaScript cruft to AMP pages. That’s useful:

Beleaguered developers working for publishers of big bloated web pages have a hard time arguing with their boss when they’re told to add another crappy JavaScript tracking script or bloated library to their pages. But when they’re making AMP pages, they can easily refuse, pointing out that the AMP rules don’t allow it. Google plays the bad cop for us, and it’s a very valuable role.

AMP is currently dying, which is good news. Google have announced that core web vitals will be used to boost ranking instead of requiring you to publish in their proprietary AMP format. The really good news is that the political advantage that came with AMP has also been ported over to core web vitals.

Take user-hostile obtrusive overlays. Perhaps, as a contientious developer, you’ve been arguing for years that they should be removed from the site you work on because they’re so bad for the user experience. Perhaps you have been met with the same indifference that I used to get regarding semantic markup.

Well, now you can point out how those annoying overlays are affecting, for example, the cumulative layout shift for the site. And that number is directly related to SEO. It’s one thing for a department to over-ride UX concerns, but I bet they’d think twice about jeopardising the site’s ranking with Google.

I know it doesn’t feel great. It’s like dealing with a bully by getting an even bigger bully to threaten them. Still. Needs must.

Wednesday, June 9th, 2021

The spirit of the staircase

The French have a wonderful phrase, lesprit de l’escalier. It describes that feeling when you’ve stormed out of the room after an argument and you’re already halfway down the stairs when you think of the perfect quip that you wish you had said.

I had a similar feeling last week but instead of wishing I had said something, I was wishing I had kept my mouth shut.

I have an annoying tendency to want to get the last word in. I don’t have a problem coming up with a barbed quip. My problem is wishing I could take them back.

This happened while I was hosting the conference portion of UX Fest last week. On the hand, I don’t want the discussions to be dull so I try to come up with thought-provoking points to bring up. But take that too far and it gets ugly. There’s a fine line between asking probing questions and just being mean (I’m reminded of headline in The Onion, “Devil’s Advocate Turns Out To Be Just An Asshole”).

Towards the end of the conference, there was a really good robust discussion underway. But I couldn’t resist getting in the last word. In the attempt to make myself look clever I ended up saying something hurtful and clumsy.

Fucking idiot.

I apologised, and it all worked out well in the end, but damn if I haven’t spent the last week on the staircase wishing I could turn back time and say …nothing.

Introducing Astro: Ship Less JavaScript

In Astro, you compose your website using UI components from your favorite JavaScript web framework (React, Svelte, Vue, etc). Astro renders your entire site to static HTML during the build. The result is a fully static website with all JavaScript removed from the final page.

YES!

When a component needs some JavaScript, Astro only loads that one component (and any dependencies). The rest of your site continues to exist as static, lightweight HTML.

That’s the way to do it! Make the default what’s best for users (unlike most JavaScript frameworks that prioritise developer convenience at the expense of the end user experience).

This is a tagline I can get behind:

Ship Less JavaScript

Tuesday, June 8th, 2021