diff --git a/components/shopify/product-detail/product-detail-info.tsx b/components/shopify/product-detail/product-detail-info.tsx index b8318aa..a41f7d3 100644 --- a/components/shopify/product-detail/product-detail-info.tsx +++ b/components/shopify/product-detail/product-detail-info.tsx @@ -172,12 +172,22 @@ const ProductDetailInfo: React.FC = ({ : 'ring-1 ring-border hover:ring-foreground/40' } ${isSoldOut ? 'option-unavailable text-foreground/60 opacity-60' : ''}`} style={{ - backgroundColor: background, + // With no colour and no image the circle would be fully + // transparent, leaving just a hairline ring that + // antialiases unevenly and reads as a speckled border. + // A neutral fill makes the initial-letter fallback look + // deliberate. Set inline so it beats the ghost variant's + // hover background. + backgroundColor: + background ?? + (image ? undefined : 'var(--color-muted)'), backgroundImage: image ? `url(${image})` : undefined, }} > {!background && !image && ( - {value.name.at(0)} + + {value.name.at(0)} + )} ); diff --git a/components/shopify/product-filters.tsx b/components/shopify/product-filters.tsx index 415767c..73bd412 100644 --- a/components/shopify/product-filters.tsx +++ b/components/shopify/product-filters.tsx @@ -208,10 +208,15 @@ const ProductFilters: React.FC = ({ ? 'ring-2 ring-foreground ring-offset-2' : 'ring-1 ring-border hover:ring-foreground/40' }`} - style={{ backgroundColor: color ?? undefined }} + style={{ + // A colourless swatch would otherwise be a fully + // transparent circle behind a hairline ring, + // which antialiases into a speckled border. + backgroundColor: color ?? 'var(--color-muted)', + }} > {!color && ( - + {value.label.at(0)} )}