Skip to main content

Custom CSS

Add custom CSS to fine-tune the appearance of the Recently Viewed widget and badges.

Updated this week

Custom CSS

Add custom CSS to fine-tune the appearance of the Recently Viewed widget and badges beyond the built-in styling options.

Adding Custom CSS

  1. Go to Online Store > Themes > Customize

  2. Click App embeds in the left sidebar

  3. Click Recently Viewed to expand settings

  4. Scroll to the Custom CSS field

  5. Add your CSS and save

Your CSS applies to all Recently Viewed elements across your store.

Common Examples

Change Widget Background

css .recently-viewed-widget { background-color: #f5f5f5; padding: 20px; border-radius: 8px; }

Style Product Cards

```css .recently-viewed-product { border: 1px solid #eee; padding: 10px; }

.recently-viewed-product:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); } ```

Customize Badge Appearance

css .previously-viewed-badge { font-size: 10px; padding: 4px 8px; border-radius: 4px; }

Hide on Specific Pages

css /* Hide widget on cart page */ .template-cart .recently-viewed-widget { display: none; }

CSS Class Reference

Element

Class

Widget container

.recently-viewed-widget

Widget heading

.recently-viewed-heading

Product grid

.recently-viewed-grid

Product card

.recently-viewed-product

Product image

.recently-viewed-image

Product title

.recently-viewed-title

Product price

.recently-viewed-price

Previously viewed badge

.previously-viewed-badge

Tips

  • Use browser developer tools to inspect elements and find the exact classes you need

  • Test your CSS on different screen sizes

  • Prefix your selectors with .recently-viewed to avoid affecting other parts of your theme

Did this answer your question?