Jump to content
Search Community

plindelauf

Business
  • Posts

    12
  • Joined

  • Last visited

Posts posted by plindelauf

  1. "Text-align: right" does not cover it, unfortunately, since the punctuation is different.

     

    I understand that you didn't have this use case in mind when designing SplitText (I didn't either), but it turns out that there are quite a few cultures that have RTL languages. From that perspective: is there any chance that you can look into this and hopefully come up with a solution?

     

    Thanks,

     

    Pascal.

    • Like 1
  2. Ok, I experimented with your suggestions. One important constraint is that I need a generic solution that works with any text, any font family, any font size and any alignment. Therefore, hard-coded margins won't work. Thus, the simplest solution for now is to use "position: relative" for all but justified text and "position: absolute" for all justified text.

     

    But I would still need some generic solution for the incorrect positioning of the justified text. Would there be any "relative correction" that would work for justified text? (I'm guessing, probably not, since then it might have already been added as functionality to SplitText...?)

     

    Thanks, Pascal

  3. Hi, 

     

    I'm using SplitText with "position: absolute" to be able to also split justified text. However, in all non-left-aligned scenarios, SplitText adds a right margin to the all but the last line, which messes up the whole text block.

     

    Without the "position: absolute", center and right aligned texts are split fine, but then justified text does not get split correctly at all...

     

    Is there any way to make this work for all text alignments?

     

    Thanks, 

     

    Pascal.

    See the Pen gaJYeV by plindelauf (@plindelauf) on CodePen

  4. I'm using the following command to initialize SplitText: 

    new SplitText(".content_wrapper", { type: "words,chars,lines", position: "absolute" })
    

    on the following DOM element:

    <div class="content_wrapper" style="width: 365px; height: 224px; opacity: 1; perspective: 400px;">Some text that indents with SplitText</div>
    

    What goes wrong is the following: 

    1. The line splits between the word "that" and "indents" 
    2. SplitText indents the word "indent" with 10px if it thinks that the space between "that" and "indents" does not fit behind "that" anymore. The effect is shown in the attached screen shot and highlighted with the red box. 
    3. If you make the parent div a bit wider, you can get to the point where SplitText *does* think the space fits behind the word "that" and then the word "indents" is not indented. 

    The problem is related the the following style setting:

    white-space: pre-wrap;

    Could you please have a look at this problem and (hopefully) solve it quickly. It goes wrong in a lot of our use cases... :(

     

    Thank you. 

     

    Pascal.

    post-39969-0-56751300-1448030573_thumb.png

    post-39969-0-49776200-1448030964_thumb.png

    See the Pen ZbZObj by plindelauf (@plindelauf) on CodePen

×
×
  • Create New...