📜 ⬆️ ⬇️

Switch width, or Kill "text-align: justify;"

I hope this post open a series of articles on typography in general and web typography in particular.

Logically, the next article will be devoted to the use of various spaces and separation intervals (such an order was in the comments to the article about dashes and hyphens of the user besisland ).

So, the thesis of the article: "as long as browsers do not have the ability to dynamically arrange hyphenation in words, webmasters should forget to switch off the width as a bad dream . "
')
This means that you need to forget the CSS construction “ text-align: justify; "And, if you have not done it yet, then burn with a hot iron all the memories of" align="justify" ".

Yin and Yang typography: width of gaps and right margin


As practice shows, the uneven width of interword spaces in the text negatively affects readability already within one paragraph (I emphasize, it is “interword”).

The even right edge of the block of text improves readability on volumes from half a standard page (with an average line width), and only in case of homogeneity of spaces.

Thus, the uniformity of the width of gaps in usually short texts on the Internet is much more important than the alignment of the right edge.

Throughout the historical development of the publication of books (from manuscripts to computer word processors), the appearance of a text strip depended on two parameters:
If at least one of these possibilities is absent, then at the same time it is impossible to satisfy the requirement of uniformity of the width of gaps and alignment of the right edge.

Manuscripts and Woodcuts


There is no mobility of letters (what he wrote, to rewrite only from a clean sheet, or to cut on a new piece of wood), the possibility of transfer is in “manual” mode.

If there are uniform spaces (and for old manuscripts - with their complete absence), a ragged right edge is usually visible (although in some places it is almost even, depending on the handwriting of the scribe).

Typographic printing (hand set, monotypes, linotypes)


There is also a mobility of letters (in more detail about distillation we will talk in a future article about spaces), and the possibility of transfer in "manual" mode.

The simultaneous uniformity of gaps and the right edge was achievable from the very beginning of printing, which greatly improved the readability of books.

Typewriter


Again, there is no mobility of letters, but hyphens can be arranged manually.

With the same spaces, we have a ragged right edge. However, when preparing “samizdat” books on a typewriter, many tried to align the right edge by doubling interword spaces (for many examples, see the Moshkov library). In my opinion, it does not look so hot, especially considering that getting rid of the “tracks” and “ladders” from the spaces inside the paragraph with such a layout is quite difficult.

Modern word processors


Trying to automatically imitate the typographical process. There is mobility of letters and the possibility of both automatic hyphenation and manual. Surprisingly, but even in MS Word, you can achieve a decent view of a block of text that is turned off in width, if you arrange hyphens in the text.

Without hyphenation, the text is terrible.

Browsers


The first type of carrier in history that has the mobility of letters, but does not have the possibility of hyphenation. In addition, the line can have almost any width (after all, good designers allow the user to change the font size!) Now, to combine uniformity of gaps and justification in width, browsers practically have to become interactive word processors: either automatically placing real-time hyphenation on arbitrary the volume of the text, or adequately processing the "soft hyphenation" ­ also in real time.

Until this happened, in terms of typography, the browser was not far from a typewriter. Realizing both this fact and the fact that in the near future, technologies will evolve to normal hyphenation processing, the designer must temporarily abandon the “ text-align: justify; ". I hope that you have long refused a code like “ p align="justify" , because it is not recommended (deprecated) in HTML 4.01 and may become obsolete in future versions of the standard.

And the last, strongest argument


Habrahabr does not use the switch in width! :)

Source: https://habr.com/ru/post/20653/


All Articles