https://htmx.org logo
Join Discord
Powered by
# hyperscript
  • a

    aloof-crayon-56651

    05/22/2023, 1:31 AM

    https://cdn.discordapp.com/attachments/796428329531605032/1110017151928127508/image.png▾

  • a

    aloof-crayon-56651

    05/22/2023, 1:32 AM
    It's not ideal, but it's something.
  • a

    aloof-crayon-56651

    05/22/2023, 1:32 AM
    You have to do all the linting yourself, though.
  • w

    wonderful-room-44774

    05/22/2023, 9:19 AM
    Hi - I trying to get some text to fade into my page using Hyperscript by it just doesn't work. It should be simple enough, just wondering why it's not working. Code at the moment - Foo - It just fails to do anything, I've tried setting the opacity on parent div without any luck. I'm using Tailwind for CSS btw. Thanks.
  • e

    elegant-raincoat-69176

    05/22/2023, 11:04 AM
    You learn a new thing every day. checkValidity() who knew? Thanks.
  • e

    elegant-raincoat-69176

    05/22/2023, 12:05 PM
    I have a form that I swap the internal contents of using HTMX dependent on the user choosing a value from a select. I have a hyperscript behavior installed on the form. When the content is swapped it stops working. How do I "reattach" the behavior once the form's contents have been swapped?
  • m

    mysterious-toddler-20573

    05/22/2023, 9:25 PM
    what does the hyperscript look like?
  • f

    freezing-waitress-26396

    05/23/2023, 9:15 AM
    Are properties with syntax
    [disabled='true']
    not supported anymore?
    Copy code
    hyperscript errors were found on the following element: <body class=​"bg-dark" _=​"on every htmx:​beforeSend in <button:​not(.no-disable)​/​>
             tell it
                 toggle [disabled='true']​ until htmx:​afterOnLoad">​…​</body>​ 
    
     Expected either a class reference or attribute expression
    
                 toggle [disabled='true'] until htmx:afterOnLoad
                         ^^
    Because I'm using blade I am unable to use the
    @disabled
    shorthand.
  • f

    freezing-waitress-26396

    05/23/2023, 9:20 AM
    From: and
  • f

    freezing-waitress-26396

    05/23/2023, 9:22 AM
    Cannot use due to Blade using
    @
    for their expressions
  • f

    freezing-waitress-26396

    05/23/2023, 9:23 AM
    Nevermind, Blade has
    @@
    to do that.
  • e

    elegant-raincoat-69176

    05/23/2023, 1:11 PM
    Presuming that question was meant for me...
    Copy code
    behavior enableSave
        on input
            if me.checkValidity()
                remove [@disabled] from #btnPersist
            else
                add [@disabled] to #btnPersist
            end
        end
    end
  • e

    elegant-raincoat-69176

    05/23/2023, 1:12 PM
    BTW: I am almost literally on the other side of the planet from you, hence the lag 🙂
  • e

    elegant-raincoat-69176

    05/23/2023, 1:12 PM
    Western Australia Represent!
  • f

    freezing-waitress-26396

    05/23/2023, 5:16 PM
    Not sure what's going on with the layout on @mysterious-toddler-20573
  • f

    freezing-waitress-26396

    05/23/2023, 5:17 PM
    removing
    .fullbleed
    from
    .basicgrid
    fixes this
  • w

    wonderful-room-44774

    05/23/2023, 11:35 PM
    To answer my own question, very obvious, I just had to set the opacity, so -
    <h1 style="opacity:0;"_="on load transition my opacity to 1">{{ foo }}</h1>
    gives a nice fade in.
  • n

    numerous-agent-22346

    05/24/2023, 12:08 PM
    I used hyperscript to fix a buggy bootstrap spyscroll. Long life to hyperscript
  • i

    icy-motherboard-95213

    05/24/2023, 5:11 PM
    So... does _hyperscript not actually support all CSS queries within query references? I'm trying to use something like
    remove <.divider ~ */>
    to remove all elements after a divider, and it's telling me (in short)
    Unknown token: ~
    . This seems odd, because I thought you could put any old CSS in there and it would work. That selector works perfectly in real CSS...
  • m

    mysterious-toddler-20573

    05/24/2023, 5:39 PM
    mmm
  • m

    mysterious-toddler-20573

    05/24/2023, 5:39 PM
    let me look at the tokenizer
  • m

    mysterious-toddler-20573

    05/24/2023, 5:39 PM
    I thought we just consumed until
    />
  • m

    mysterious-toddler-20573

    05/24/2023, 5:41 PM
    ugh
  • m

    mysterious-toddler-20573

    05/24/2023, 5:41 PM
    we need to add tilde to the token table
  • m

    mysterious-toddler-20573

    05/24/2023, 5:41 PM
    I need to rethink that
  • m

    mysterious-toddler-20573

    05/24/2023, 5:42 PM
    we should be consuming anything
  • i

    icy-motherboard-95213

    05/24/2023, 5:52 PM
    For now I'll just hide it, no big deal, but I would like to be able to actually remove those elements from the DOM someday
  • i

    icy-motherboard-95213

    05/24/2023, 5:53 PM
    will mark that TODO in my code and move on for now
  • f

    future-napkin-62788

    05/25/2023, 8:31 PM
    Hey, folks, hyperscript noob here. wondering is there a changelog/version history somewhere? I just ran into this issue (https://github.com/bigskysoftware/_hyperscript/issues/334) which causing problems for quite a few of my users with older ios, and it seems safest bet is to downgrade to 0.9.5 and I'm wondering if I'd miss anything important by doing that. Thanks!
  • c

    calm-ice-23682

    05/27/2023, 5:32 PM
    you can try browsing the release notes here: https://hyperscript.org/talk/