https://htmx.org logo
Join Discord
Powered by
# htmx-general
  • g

    gorgeous-airport-54386

    10/27/2022, 11:21 PM
    in append mode
  • m

    mysterious-toddler-20573

    10/27/2022, 11:21 PM
    normal append mode is "append if absent"
  • g

    gorgeous-airport-54386

    10/27/2022, 11:22 PM
    Copy code
    <link rel=stylesheet data-inserted-by="/thing">
  • g

    gorgeous-airport-54386

    10/27/2022, 11:22 PM
    and it would be removed before swapping from /thing again
  • m

    mysterious-toddler-20573

    10/27/2022, 11:23 PM
    If it saw that exact link again, in append mode, it would not be appended since it already exists
  • m

    mysterious-toddler-20573

    10/27/2022, 11:23 PM
    if you changed any of the data, it would be
  • g

    gorgeous-airport-54386

    10/27/2022, 11:23 PM
    can you identify everything in a head tag?
  • g

    gorgeous-airport-54386

    10/27/2022, 11:23 PM
    what about inline scripts/styles?
  • m

    mysterious-toddler-20573

    10/27/2022, 11:23 PM
    yes, by it's outerHTML
  • g

    gorgeous-airport-54386

    10/27/2022, 11:24 PM
    what if i had a fragment that had dynamically changing css
  • m

    mysterious-toddler-20573

    10/27/2022, 11:25 PM
    outerHTML changes, it gets appended
  • m

    mysterious-toddler-20573

    10/27/2022, 11:25 PM
    in sync mode, the old code is dropped the new code is added
  • b

    bitter-machine-55943

    10/28/2022, 1:37 AM
    @mysterious-toddler-20573 your JS code style is so refreshing
  • e

    echoing-action-55459

    10/28/2022, 1:49 AM
    womp, the head of the new element is replacing the old tag.
  • e

    echoing-action-55459

    10/28/2022, 1:49 AM
    even a more annoying issue is that my style tag has an id
    <style id="__FRSH_TWIND">
  • g

    gorgeous-airport-54386

    10/28/2022, 1:50 AM
    the way fresh is implemented is super hacky
  • e

    echoing-action-55459

    10/28/2022, 1:51 AM
    astro isn't much better the tailwind implementations both are similar
  • g

    gorgeous-airport-54386

    10/28/2022, 1:51 AM
    so it collapses as soon as you deviate from how it expects you to code
  • g

    gorgeous-airport-54386

    10/28/2022, 1:51 AM
    well tailwind is just like that
  • g

    gorgeous-airport-54386

    10/28/2022, 1:51 AM
    idk how people still haven't learned that it's impossible to analyze what class names are used on a website in the general case
  • e

    echoing-action-55459

    10/28/2022, 1:52 AM
    does it make sense to bundle the class names into a css file instead of a style tag?
  • g

    gorgeous-airport-54386

    10/28/2022, 1:52 AM
    doesn't change much
  • e

    echoing-action-55459

    10/28/2022, 1:52 AM
    has there been much thought about a HTMX specific server?
  • g

    gorgeous-airport-54386

    10/28/2022, 1:53 AM
    you need to have the list of all classes used in the page to generate the bundle
  • g

    gorgeous-airport-54386

    10/28/2022, 1:53 AM
    which you can't if fragments are being added in
  • g

    gorgeous-airport-54386

    10/28/2022, 1:53 AM
    htmx works well with all backends. fresh isn't your issue here, twind is
  • e

    echoing-action-55459

    10/28/2022, 1:54 AM
    is there a better way to do css within the HTMX ecosystem?
  • g

    gorgeous-airport-54386

    10/28/2022, 1:54 AM
    tailwind jit would work but it would be bad for performance
  • e

    echoing-action-55459

    10/28/2022, 1:58 AM
    I may be able to modify the tailwind fresh plugin to place the style within the body 😅
  • e

    echoing-action-55459

    10/28/2022, 2:46 AM
    ended up making some small tweaks to the plugin and it works! https://gist.github.com/reggi/b2d22bc825e6e5a49e2fa47031c38cea
1...878879880...1146Latest