Your branding inconsistency issue requires addressing three fundamental aspects of how iframe-embedded content handles styling in the Partner Portal.
First, iframe CSS loading is constrained by browser same-origin security policies that prevent parent pages from injecting styles into iframe content when the iframe source is on a different origin. Your main portal (presumably on partner.aec.com) cannot directly style content loaded from analytics.partner.aec.com because browsers treat subdomains as separate origins. The solution requires loading stylesheets directly within the iframe source pages. Since you control the analytics subdomain, add your custom CSS link tags to the HTML head of those pages:
<link rel="stylesheet" href="https://assets.partner.aec.com/css/brand.css">
The critical point is that these stylesheets must either be hosted on the same origin as the iframe content OR properly configured for cross-origin access.
Second, CORS for stylesheets needs explicit configuration on your stylesheet server. When the analytics subdomain tries to load CSS from a different origin (like a central assets server), the browser performs a CORS check. Your assets server must respond with appropriate headers allowing the analytics subdomain to load the resources. Configure your assets server (whether it’s a CDN, nginx, or Apache) to send these headers:
Access-Control-Allow-Origin: https://analytics.partner.aec.com
Access-Control-Allow-Methods: GET
For multiple subdomains, you can either list them all or use a wildcard pattern. The key is ensuring the stylesheet server explicitly permits cross-origin loads. Additionally, ensure your stylesheets are served over HTTPS - mixed content policies in modern browsers will block HTTP stylesheets loaded into HTTPS pages.
Third, brand consistency across iframe boundaries requires architectural planning beyond just CSS loading. Consider creating a shared component library that both your main portal and iframe content can reference. This ensures consistent styling, but also consistent behavior and interaction patterns. For aec-2021’s Partner Portal, implement a theming system where all embedded content pulls from a centralized theme configuration. Use CSS custom properties (variables) defined at the root level of each page - both parent and iframe - so theme updates propagate consistently.
The recommended architecture: establish an assets subdomain (assets.partner.aec.com) with proper CORS headers, host your brand CSS there, and reference it from all your portal pages including iframe sources. This provides centralized style management while satisfying browser security requirements. For iframe content you don’t control (truly external partners), consider using postMessage API to communicate theme preferences, allowing external pages to adapt their styling to match your brand without direct CSS injection.
This draft is based on general Adobe Experience Cloud knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.