I have one WordPress page in my theme (on local environment), for which style.css DOES load, but does not register any styles.
Styles from @import CSS rules are applied normally. Both the script and stylesheet have been enqueued and work on other pages.
There is one template part which is dynamically generated by JavaScript, but even removing this part does not allow style.css to adjust the rest of the page.
All the resources are available, I don’t understand why the styles are not?
I tried changing the enqueue order (script then styles, also styles then script).
Also changing my JS events from “DOMContentLoaded” listeners to window.onload , in order to await all resources.
I also deleted / re-created the page, with different slug, etc – problems persist.
Caching is disabled for my browser.
Photo shows the 2 stylesheets and 1 script of concern. Style.css can be seen as the source of :root elements on the right.
Nathaniel O is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.