Posted by CharlesW 2 days ago
API’s should provide content in the format asked of them. CSS should be used to style that content.
This is largely solved in RFC-6838 which is about “how media types, representation and the interoperability problem is solved”. https://datatracker.ietf.org/doc/rfc6838/
Already supported by .NET Web APIs, Django, Spring, Node, Laravel, RoR, etc.
Less mature ecosystems like Golang have solutions, they’re just very much patch-work/RYO.
Or even use OpenResty or njs in Nginx, which puts the transformation in the web service layer and not the web application layer. So your data might be JSON blob, it’ll convert to HTML in real-time. Something similar can be achieved elsewhere like Apache using mod_lua etc.
I think bastardising one format (HTML), to support another format (JSON), is probably not the right move. We’ve already done that with stuff like media queries which have been abused for fingerprinting, or “has” CSS selectors for shitty layout hacks by devs who refuse to fix the underlying structure.
That's the whole point of XSLT, ship the data and tell the browser how to transform it to HTML.
Unless you have a good example, I think you’re coming at this from an “everything’s a nail if the only tool I have is a hammer”.
Google pays people to destroy the open web, not improve it. These Google engineers are pathetic and should be ashamed of their inept laziness.
Google's unilaterally tries to kill part of the web that not let them track or profit from ads so easy ?
.. and with all that money they get (and brains), still to lazy to fix few old bugs (stuck at old version).
now how about that:
Chrome voluntarily decides to disjoint self from parts of the web where it can't take profits - saying they are not in fashion ..
- and if then, actually no one would like to have to follow ever again anything like that ?. (ocean is _big_ and.. blue)
XSLT is no more "baggage" than HTML itself. Removing it in no way "moves the web forward". And integrating technologies part of the current hype cycle, which very well may disappear in a year, is a terrible idea.