Skip to content
  • Leon Arnott's avatar
    Tried to fix a bug where block elements in Chrome wouldn't inherit opacity. · a38a93a77b97
    Leon Arnott authored
    The problem specifically occurred when using <div> tags in passages: the opacity transition would stop working for that block element due to its <tw-transition-container> being inline. Now, <tw-transition-container> should usually be inline so that inline hook transitions like (t8n:"shudder")[this] can work in the midst of paragraphs, but in cases where ANY of its children are blocks, it needs to be forced to inline-block.
    
    There isn't a fast way of divining this without using the costly jQuery#css() on every element, so I resorted to deploying some rough approximations: if the elements' tags fit a hard-coded whitelist or blacklist, then they're assumed inline or block. Otherwise, css() is resorted to. This is definitely flawed insofar as it ignores story CSS that could change the blacklisted elements' display to inline/block, but that case is deemed rare enough that I'm going with this anyway.
    a38a93a77b97