Jump to content
GreenSock

R.J. LaCount

BusinessGreen
  • Posts

    4
  • Joined

  • Last visited

Posts posted by R.J. LaCount

  1. 3 minutes ago, Visual-Q said:

    If I'm understanding your request adding "words' to your split text type seems to make hyphens break correctly.

     

    
    const split = new SplitText(text, { type: 'lines','words' });

     

     

    I think you're seeing it break correctly after that change because the object isn't formatted correctly (should be

    {  type: 'lines, words' }

    ) which is causing a JavaScript error preventing SplitText from running at all.

  2. Hello,

     

    I'm encountering what I believe is a very similar issue to this thread, but I can't seem to get the applicable part of the solution to work in my context.

     

    I have some large hero copy in a narrow container with a hyphenated word that SplitText is unable to break apart. From what I'm reading in the linked thread, this is happening because the one "word" cannot be split into multiple divs, so I need to swap in a non-breaking dash character in for the regular one, but I'm not having luck pulling that part out into my demo.

     

    Attached a couple of screenshots in case the hyphenated word is not rendering at the same spot on your end in the Codepen example.

    02-after-splittext.png

    01-before-splittext.png

    See the Pen dEEPwo by TheFunkyMonk (@TheFunkyMonk) on CodePen

×