CSS not applied for dynamic content no picking up
-
I have been using Spectra for months now and have loved it so far.
Below is the scenario I am raising the ticket for.
I have a webpage completely built out with Spectra components. On one of the container block, I make a REST API call that reponds with a simple html fragment. This fragment has the Spectra CSS classes in them.
When the html contents are updated on the page however, all formatting and CSS is lost.
Troubleshooting done so far:
- If I paste the same html code using “custom HTML” block, the CSS is applied.
- If I have the html code anywhere on the page (using custom html) block, my response from the api does get formatted
So I think that only CSS that is loaded when the page loads, is for the components that *already* exist on the page.
Is there a way to force the loading of CSS for components that are not available on the first load of the page? This really breaks my usecase and would love to see a good way to address this issue.
The topic ‘CSS not applied for dynamic content no picking up’ is closed to new replies.