Earlier quoted context omitted.
Yes, but you shouldn't use it as a simple drop-in. The minified version via CDN is like 1.7 MB ... at least they mention you should not use it in the docs and instead configure it to your needs.
tailwind is 1.7MB of CSS? ....whyy?
Htmx – high power tools for HTML
121–130 of 175 posts
Re: Htmx – high power tools for HTML
#122Earlier quoted context omitted.
Add tailwind css or another utility class css framework and you can do the whole frontend in html :)
Yes, but you shouldn't use it as a simple drop-in. The minified version via CDN is like 1.7 MB ... at least they mention you should not use it in the docs and instead configure it to your needs.
Re: Htmx – high power tools for HTML
#123One of the problems I see is that now anyone that was using intercooler is using an outdated and quite likely to become unmaintained library and be forced to migrate/rewrite things.
Re: Htmx – high power tools for HTML
#124The example on the front page already hints at the type of bad programming this may encourage. When clicked, the button sends a POST (this seems ok), and then the backend sends new html for the button. The idea of having random snippets of your frontend markup being returned from api servers seems questionable.
Re: Htmx – high power tools for HTML
#125Re: Htmx – high power tools for HTML
#126This looks amazing -- seems like you can accomplish a significant amount of what constitutes front-end work these days with htmx. The examples are compelling: https://htmx.org/examples/ There is a slight deal-breaker for me. Much of the functionality revolves around hx-swap'ing i.e. writing the contents of a response as HTML into/around tags. This requires the server-side to return HTML instead of JSON. From the docs…
You could check out the client side templates extension: https://htmx.org/extensions/client-side-templates/
can use one of three attributes named -temlpate (e.g. mustache-template)Re: Htmx – high power tools for HTML
#127Earlier quoted context omitted.
tailwind is 1.7MB of CSS? ....whyy?
It defines css classes for most css properties. Their website [1] explains why you might want that pretty well. Regarding file size, the idea is that you use something like PurgeCSS in your build pipeline, which removes all unused css classes. A bit like tree shaking for css. [1] https://tailwind.css
Re: Htmx – high power tools for HTML
#128hello, I'm the creator of htmx (and originally intercooler) I just released 0.0.4, so htmx is still very young, but it's got a decent test suite: https://htmx.org/test/0.0.4/test/ there is a nice extension mechanism: https://htmx.org/extensions/ and some very rough docs on how to pull off pure HTML animations: https://htmx.org/examples/animations/ happy to answer questions
On the click-to-load example https://htmx.org/examples/click-to-load/ I see no network traffic when I click the 'load more agents' button. Am I missing something, where are the requests going?
Re: Htmx – high power tools for HTML
#129I'm immediately turned off by the demo though, because it's relying on a 'fake http server' in the client side JS.
If your toy examples can't be run against a real server, I have zero expectation of it working well for non-trivial examples.
Re: Htmx – high power tools for HTML
#130I like the theory of this (that is: using XHR to update parts of a page with the result of requests) I'm immediately turned off by the demo though, because it's relying on a 'fake http server' in the client side JS. If your toy examples can't be run against a real server, I have zero expectation of it working well for non-trivial examples.
I mean, this is actually even better. You can expand the mock-server down below and see what's happening.