How can I fetch CSS from JSON WP REST API response

CSS of what?

CSS can be relevant only in the context of the full page, and as long as you do not request data for the full page (which you can easily do by just fetching the page and parsing it for the relevant style rules) you lack context. There is simply no such thing as a CSS of a post. Posts can appear in many contexts and in each of them have different styling.

So it is not so much an issue with a technical way to do that, as more of the fact that the requirement itself do not make much sense in context of an API that is supposed to bring data on a single post without any hint of a context.

Leave a Comment