NO BUG: Spaces within words are added when text-align is set to justify

Browser: Chrome 130
OS: Windows

In some paragraphs, which are written in Hebrew (RTL) and text align is set to justify, spaces WITHIN words are added (see attached screenshot as an example โ€“ red triangles mark the space added). This makes the text look obscured and not easy to read.

I didnโ€™t find any common denominator between all paragraphs that have the same issue.

Retyping the text didnโ€™t solve the issue.

Setting text align via CSS (instead of Style > Typography > Text align) didnโ€™t solve the issue.

Hi,

I believe this is not caused by Bricks itself. Will wait by marking this topic as no-bug, but Iโ€™m quite sure itโ€™s not related to Bricks.
Can you try the same with the default theme, or even with some online editor? Iโ€™m sure you will get the same/similar results if you use the same paragraph width.

Additionally, I could try it, but I donโ€™t know how to read, even less how to write in Hebrew/RTL. :sweat_smile:

Let me know.
Thanks.

Thanks for your reply.
I believe that itโ€™s caused by Bricks. Iโ€™m currently moving my website from Elementor Pro to Bricks (rebuilding it). Iโ€™m using the same version of WordPress in both websites. I donโ€™t have this kind of problem in the Elementor website, only in Bricks

Take care

Hi litmol,
Welcome to the forum!

Thatโ€™s the usual and expected result when using justified text: itโ€™s unpredictable. It has to add space between the words, otherwise the text wouldnโ€™t be justified. Unfortunately Iโ€™m not able to read Hebrew, so I canโ€™t tell how it should look like, but I believe the result would be exactly the same in pure HTML/CSS or Elementor within the exact same conditions (widths, font-size, etc).

Long story short: Itโ€™s not advisable to use text-align: justify on the web. Even in programs such as InDesign, justified text has to be balanced manually from time to time, as it does not always work depending on the width, content, font, font size, and letter-spacing. The difference, however, is that the layout does not adapt - it always remains the same, which isnโ€™t the case for a website.

Best,
timmse

Hi timmse

Thank you for providing such a detailed answer.

As you correctly mentioned at the beginning of your answer, when using justified spaces are added between the words.

The issue that Iโ€™m facing is that Bricks add spaces within the words and thus making the text almost unreadable.

Iโ€™ve been using Elementor for years with different themes and never had such a problem, thatโ€™s way I think that it is a bug in Bricks.

Take care

litmol

We donโ€™t do anything other than apply text-align: justify. Thatโ€™s it.

Check this Bricks demo (temporary link) using the same setup as my previous codepen example:
https://try.bricksbuilder.io/ted545f0/text-align-justify/

I canโ€™t see any difference.

Unfortunately, we canโ€™t say anything more about it without a live link and/or a comparison to e.g. a codepen or an elementor site that uses the exact same setup.

I appreciate your willingness to help.

This link is for a post on my staging website (built with Bricks). Please take a look at the excerpt and at the 4th line bellow the first h2 heading. There are spaces within words.

This link is for the same post (there are some minor differences) on my live website (built with Elementor). If youโ€™ll look at the excerpt and 4th line bellow the first heading, youโ€™ll see that they look different than same lines in the first link (there are not spaces within words).

This is just one example.

I truly hope that this will help you to get a better understanding of the issue.

In any case, thank you in advance for your support.

litmol

The issue is caused by the combination of these two factors:
(1) Using Googleโ€™s font Rubik as a custom font
(2) Disabling Google Fonts (Bricks settings > Performance)

When one of these factors is removed (either using another font or enabling Google Fonts) the phenomena of spaces added between letters in the same word do no longer exists.

I canโ€™t tell if there is some problem with the Rubik font, or in the way Bricks saved the font as a custom font.