Skip to main content Dennis Traub - Software Engineer & Developer Advocate

Writing CSS selectors with Amazon Q Developer

I’m notoriously bad at CSS! 😅

I rarely work with it, so advanced selectors always leave me scratching my head. But thanks to AI, I don’t need to memorize them anymore!

Today’s example: I needed to style specific elements, but only if they weren’t the first one. Instead of googling CSS selectors for the hundredth time, I let Amazon Q’s new Inline Chat handle it for me. Here’s my workflow:

1️⃣ Select the CSS snippet
2️⃣ Press Ctrl+i (Cmd+I on Mac) for Q’s Inline Chat
3️⃣ Explain what I need in plain English
4️⃣ Review Q’s generated diff
5️⃣ Quick sanity check and accept!

Using AI without interrupting my coding flow really is a game changer!