The b2c theme in Intershop PWA is a 'configurable theme', meaning it is designed to be adapted at runtime using CSS custom properties (CSS variables).
Unlike the b2b theme, which uses variables.scss to assign static values directly to SCSS variables, the b2c theme assigns CSS custom properties to those SCSS variables. This allows you to override branding (colors, logos, fonts) via inline styles on the <html> tag without rebuilding the PWA.
Key Difference in Implementation:
- B2B Theme: Uses direct SCSS assignments (e.g.,
$logo: url('...');). - B2C Theme: Uses CSS variable assignments (e.g.,
$logo: var(--logo);) and defines default values in properties.scss (e.g., --logo: url('...');).
Important Limitation: SCSS color functions like darken() and lighten() do not work with CSS custom properties because they require real color values at compile time. The standard Intershop PWA styling has been adapted to avoid these functions, but if you use Bootstrap-generated styles that rely on $primary or $secondary, you may need to manually override those styles in your project's global styles.
<html style="--logo: url(https://example.com/logo.svg); --logo-width: 260px; --corporate-primary: #006b99;" lang="en-US">