3 ms·
Lol naw man that ain't it but i'm surprised apparently nobody got what I was getting at: Say I have my css sheet included, now I still need to set the class an
by jdthedisciple 4y ago
Lol naw man that ain't it but i'm surprised apparently nobody got what I was getting at:
Say I have my css sheet included, now I still need to set the class and id attributes everywhere I need styling.
Are you telling me the client needs to parse the html result and add those manually? Seems absurd. Are you telling me a real Hypermedia API would return stuff like
<div class="...">data</div>
? That would seem equally absurd, why would the API concern itself with css classes lol.
That's what I don't get
- quickthrower2 4y agoOh I see. Cant speak to the library author’s intent but I think of it like this. Take an old school original rails app. No JS. Nothing. If something is gonna happen it is because you clicked a link or submitted a form. In that app any page is generated by the server and must have any classes defined for css also rendered. So the server is already needing to know about this and inject those classes. With HTMX it is the same thing except you render partials sometimes and sometimes the whole page.
- mixmastamyk 4y agoKISS… use semantic tags when possible. In this example, perhaps table. Classless CSS helpful as well. Beyond that I don’t think adding an id or class here and there is too bad. I’d avoid class heavy frameworks, as I believe you are alluding to.