/** * PurgeCSS config for consolidating the migrated WordPress/Elementor CSS. * Content = rendered static HTML (authoritative class list) + component source * (catches runtime-toggled classes that appear as string literals, e.g. "active", * "is-active", "animated", and the body-class strings in src/lib/bodyClasses.ts). * * Conservative by design: keyframes / @font-face / CSS variables are kept (PurgeCSS * defaults), and a safelist guards classes added by JS at runtime. */ module.exports = { css: ["public/css/site.css"], content: [ "out/**/*.html", "src/**/*.{tsx,ts,jsx,js}", ], // Keep classes toggled/added at runtime by GSAP/React state and header/menu logic. safelist: { standard: [ "active", "is-active", "is-hiding", "animated", "header-visible-scrolled", "dm-header-scrolled", "header-visible", "current-menu-item", "current_page_item", "current-menu-ancestor", "menu-open", "loaded", ], greedy: [ /^elementor-.*-animation/, // animation utility classes applied on scroll /animated$/, /^swiper-/, // carousel runtime classes /^owl-/, // carousel runtime classes ], }, };