Elevate Your Shopify Spotlight Theme: Adding a Dynamic Blue Outline to Email Forms on Focus
Hey fellow store owners!
It's amazing how often the smallest design tweaks can make a huge difference in how professional and user-friendly our Shopify stores feel. Recently, I was following a really insightful discussion in the Shopify community about something seemingly simple but incredibly impactful: putting a subtle blue outline around an email signup form, specifically on the popular Spotlight theme, that only appears when someone starts typing. This is often called a 'focus state' outline, and it's a fantastic accessibility and usability feature.
Our friend qbhood kicked off the conversation, asking for help to achieve exactly this look for their Spotlight store. They even shared a reference image of what they were aiming for:

The Core Challenge: Getting That 'Typing Only' Glow on Spotlight
What qbhood really wanted was that dynamic blue ring, not an always-on border. This is where things can get a little tricky because themes handle input fields differently, and applying CSS correctly requires targeting the right element in the right state.
There was a bit of back and forth in the thread about where to put the code. Some folks, like One-Sun1995 and ahsandoesntcare, suggested looking for a 'Custom CSS' box within the theme editor for the Email signup section. This is often the ideal, cleaner way to add section-specific styles without touching core theme files. However, Ploqo, a super helpful expert in the thread, clarified that Spotlight themes typically don't have this 'Custom CSS' box for the email signup section. This means we'll need to dive into the theme's code directly, which isn't as scary as it sounds, I promise!
The Solution: Adding a Dynamic Focus Outline via Theme Code
Based on Ploqo's excellent guidance and the specific need for a 'typing only' effect, here's the most effective way to add that blue outline to your Spotlight theme's email signup form. This method uses box-shadow to create that soft, glowing outline that looks fantastic.
Step-by-Step Instructions:
- Access Your Theme Code: From your Shopify admin, go to Online Store > Themes. Find your current theme (it should be Spotlight) and click Actions > Edit code.
- Locate the CSS File: In the left-hand sidebar, navigate to the Assets folder and open
base.css. This is a common stylesheet where you can safely add custom CSS. - Paste the Code: Scroll to the very bottom of the
base.cssfile. Delete any previous newsletter code you might have added for this effect, then paste the following CSS snippet:
.newsletter-form .field__input:focus,
.newsletter-form .field__input:focus-visible {
box-shadow: 0 0 0 0.3rem #0b63f6;
border-radius: 0.4rem;
outline: 0;
}
- Save Your Changes: Click the Save button in the top right corner.
Once saved, visit your store and test it out! You should now see a clean, blue outline appear only when you click or tab into the email input field, just as qbhood wanted. Ploqo even shared these visuals to show the difference:
The box at rest, no blue:
The blue ring while typing (the focus state!):
Breaking Down the Code:
.newsletter-form .field__input:focus, .newsletter-form .field__input:focus-visible: These are CSS selectors. They tell the browser exactly which element to style (the input field inside the newsletter form) and under what condition (when it's 'focused' either by clicking into it or navigating with a keyboard, thanks to:focus-visible).box-shadow: 0 0 0 0.3rem #0b63f6;: This is the magic for the blue outline. It creates a shadow that's spread out (the fourth '0') to act like a border.0.3remcontrols its thickness, and#0b63f6is the blue color.border-radius: 0.4rem;: This gives the corners a slight rounding, making it look softer and more modern.outline: 0;: This is important! Browsers often add their own default outline when an element is focused. Setting this to0ornoneremoves that default, allowing your custombox-shadowto shine through without interference.
Adjustments and Important Considerations
The beauty of CSS is how easily you can customize it:
- Thickness: Change
0.3remto make the blue ring thicker or thinner. - Corner Rounding: Adjust
0.4remfor more or less rounded corners. - Color: Swap
#0b63f6for any hex color code that matches your brand! - Where to put the code: While
base.cssis a safe bet, ahsandoesntcare wisely suggested that if Spotlight is Dawn-based,Assets > component-newsletter.cssmight be a tidier spot, especially if you plan on frequent theme updates. This keeps newsletter-specific styles grouped together. However, for a quick, reliable fix,base.cssat the bottom works perfectly. - Klaviyo Popups: Ploqo also highlighted a crucial point: if your store uses a third-party email popup (like Klaviyo), this CSS won't affect it. Those forms are styled within the app's settings, not your Shopify theme.
- Multiple Forms: If you happen to have multiple newsletter forms on a single page and only want to style one, you'd need to get more specific with your CSS selector, potentially using a section ID (e.g.,
#shopify-section-template--1234 .newsletter-form .field__input:focus). You can find these IDs by right-clicking the element and choosing 'Inspect' in your browser.
Building a thriving online store on Shopify means paying attention to the details, and sometimes, those little tweaks make all the difference. If you're just starting your journey, creating your Shopify store is the first exciting step, and customizing it to perfectly match your brand is part of the fun!
It's these kinds of community discussions that really empower store owners to take control of their online presence. Don't be afraid to experiment with these CSS snippets. Always remember to make a duplicate of your theme before making any code changes, just in case you need to revert. Happy customizing!