Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Mouseover and Transition together (Harlowe)

I'm struggling to get a transition to fire when used in tandem with a mouseover event. Anyone run into this before?
You're going to tell me that a hookah... something even //more harmful// than cigarettes...

(set: $factPop to (mouseover: "more harmful") + (t8n: "pulse"))

$factPop[<div class="cdc-fact">Because of the way a hookah is used, smokers may absorb more of the toxic substances also found in cigarette smoke than cigarette smokers do. The amount of smoke inhaled during a typical hookah session is about 90,000 milliliters, compared with 500–600 milliliters inhaled when smoking a cigarette. Source: Centers for Disease Control and Prevention</div>]
My best guess is that the transition is happening when the page is loaded, but the passage isn't visible so I'm not seeing it.

Comments

  • The issue is the div element within your $factPop[] hook, it seems to interfere with the pulse transition. I don't know if this is a bug or the way the macro is meant to work but I would suggest you create a new issue on the Harlowe project website about it.

    One way to temporarily get around the issue is to place the div element outside the hook like so:
    You're going to tell me that a hookah... something even //more harmful// than cigarettes...
    
    (set: $factPop to (mouseover: "more harmful") + (t8n: "pulse"))
    
    <div class="cdc-fact">$factPop[Because of the way a hookah is used, smokers may absorb more of the toxic substances also found in cigarette smoke than cigarette smokers do. The amount of smoke inhaled during a typical hookah session is about 90,000 milliliters, compared with 500–600 milliliters inhaled when smoking a cigarette. Source: Centers for Disease Control and Prevention]</div>
    
  • greyelf wrote: »
    The issue is the div element within your $factPop[] hook, it seems to interfere with the pulse transition. I don't know if this is a bug or the way the macro is meant to work but I would suggest you create a new issue on the Harlowe project website about it.
    Interesting. It appears that any html within the hook breaks transitions. That presents some challenges, since styles applied to the div will remain visible (like padding, margins). Maybe I can figure out a way around that using JS.
    Thanks for the help! I'll create an issue,
Sign In or Register to comment.