How to inherit theme styling for product elements in a custom app extension carousel?

I’m building an app extension with a product carousel and want the product titles, prices, and other elements to automatically match the merchant’s theme styling.

What’s the best approach to access and apply the active theme’s product card styles so my carousel integrates seamlessly across different themes?

Thanks in advance for any guidance!

You’ll get the best results by building your product carousel as a Theme App Extension, specifically a `block` or `section` extension. These extensions render directly within the merchant’s theme context, meaning your elements will naturally inherit the theme’s CSS for fonts and colors without you needing to do much manual work. It’s designed for exactly this kind of seamless storefront integration.

If for some reason a Theme App Extension isn’t suitable for your app’s architecture and you’re using a different type of app extension (like a UI Extension that renders in a specific slot), then it becomes much harder. You’d have to manually inspect common theme CSS properties (like `font-family`, `font-size`, `color`, `line-height`) from a few popular themes and try to replicate them in your extension’s stylesheet. You can sometimes leverage CSS variables like `var(–color-text)` or `var(–font-body-family)` if the theme exposes them, but that’s not guaranteed across all themes. For a truly seamless look, Theme App Extensions are the way to go.

P.S. I’m building a gamified discount app called Game Gophers. Looking for beta testers if you or anyone else is interested.

Thanks! We’re actually using a Theme App Extension (app block), but we’re still not getting automatic style inheritance for product prices - the font size, and colors differ from the theme’s native product cards.

We currently have a product template where we apply CSS variables (like var(--color-price), var(--font-body-weight), etc.), but we’ve found that not all themes use the same variable names, which breaks the styling consistency across different themes.

Is it a good idea to manually find and use each theme’s CSS variables, or is there an easier way to make our app block match the theme’s product styles?

In that case, I don’t think there is any easier way to make it match the theme’s style. You’ll have to either find the style for each theme and set it accordingly or allow merchants to customize it themselves using an App Block Schema.

Sounds good. I’ll go with one of the options you mentioned. Thanks a lot, really appreciate it.