{"id":11737,"date":"2024-06-10T23:08:52","date_gmt":"2024-06-10T21:08:52","guid":{"rendered":"https:\/\/monodes.com\/predaelli\/?p=11737"},"modified":"2024-06-10T23:08:59","modified_gmt":"2024-06-10T21:08:59","slug":"better-text-wrapping-using-text-wrap","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2024\/06\/10\/better-text-wrapping-using-text-wrap\/","title":{"rendered":"Better text wrapping using text-wrap"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<figure class=\"wp-block-image\"><a href=\"https:\/\/css-tip.com\/text-wrap\/\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2024\/06\/fc0eICcTx-1207.png?w=910&#038;ssl=1\" alt=\"\"\/><\/a><\/figure>\n\n\n\n<p>The text-wrap property allows you to control how text is wrapped<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-css\" data-line=\"\">* {\n  text-wrap: pretty;\n}\nh1,h2,h3,h4,h5,h6 {\n  text-wrap: balance;\n  \/* it works well with text-align: center *\/\n}<\/code><\/pre>\n<cite>\u00a0From <em><a href=\"https:\/\/css-tip.com\/text-wrap\/\">Better text wrapping using text-wrap<\/a><\/em><\/cite><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2024\/06\/10\/better-text-wrapping-using-text-wrap\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"quote","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"federated","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[46],"tags":[],"class_list":["post-11737","post","type-post","status-publish","format-quote","hentry","category-web","post_format-post-format-quote"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-33j","jetpack-related-posts":[{"id":5096,"url":"https:\/\/monodes.com\/predaelli\/2018\/12\/30\/why-monospace-font\/","url_meta":{"origin":11737,"position":0},"title":"Why monospace font?","author":"Paolo Redaelli","date":"2018-12-30","format":false,"excerpt":"Does Column Width of 80 Make Sense in 2019? \u2013 Hacker Noon Why monospaced font, too? See http:\/\/liberty-eiffel.blogspot.com\/2012\/01\/im-almost-literate-program-please.html Seriously, the width of a line of code has much more to do about readability and understandaility than sheer \"screen usage\". Does Column Width of 80 Make Sense in\u00a02019? One of the\u2026","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":12735,"url":"https:\/\/monodes.com\/predaelli\/2025\/02\/12\/justified-text-better-than-expected-cloud-four\/","url_meta":{"origin":11737,"position":1},"title":"Justified\u00a0Text: Better Than Expected? \u2013 Cloud Four","author":"Paolo Redaelli","date":"2025-02-12","format":false,"excerpt":"Justified\u00a0Text: Better Than Expected? \u2013 Cloud Four Do new CSS properties make justified text with automatic hyphenation more viable? \u00a0","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7795,"url":"https:\/\/monodes.com\/predaelli\/2020\/12\/02\/rich-text-on-terminal-in-python\/","url_meta":{"origin":11737,"position":2},"title":"Rich text on terminal in Python","author":"Paolo Redaelli","date":"2020-12-02","format":"link","excerpt":"Rich is a Python library for rich text and beautiful formatting in the terminal.","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/monodes.com\/predaelli\/category\/python\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2020\/12\/rich.python-features.png?fit=1131%2C1200&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2020\/12\/rich.python-features.png?fit=1131%2C1200&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2020\/12\/rich.python-features.png?fit=1131%2C1200&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2020\/12\/rich.python-features.png?fit=1131%2C1200&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2020\/12\/rich.python-features.png?fit=1131%2C1200&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":7323,"url":"https:\/\/monodes.com\/predaelli\/2020\/06\/08\/css-pseudo-selectors-you-might-have-missed-bits-and-pieces\/","url_meta":{"origin":11737,"position":3},"title":"CSS Pseudo-Selectors You Might Have Missed &#8211; Bits and Pieces","author":"Paolo Redaelli","date":"2020-06-08","format":"link","excerpt":"Useful CSS pseudo-classes that are often overlooked. Source: CSS Pseudo-Selectors You Might Have Missed - Bits and Pieces (Pseudo) selectors let you assign styles to what are, in effect, phantom classes that are inferred by the state of certain elements, or markup patterns within the document, or even by the\u2026","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2020\/06\/1Nj2EzGOskF51B5AKuR-szw.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2020\/06\/1Nj2EzGOskF51B5AKuR-szw.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2020\/06\/1Nj2EzGOskF51B5AKuR-szw.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2020\/06\/1Nj2EzGOskF51B5AKuR-szw.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":10748,"url":"https:\/\/monodes.com\/predaelli\/2023\/08\/30\/my-little-printer-friendly-css\/","url_meta":{"origin":11737,"position":4},"title":"My little printer-friendly CSS","author":"Paolo Redaelli","date":"2023-08-30","format":false,"excerpt":"Here is my little \"Printer friendly CSS\" that I add to each and every page using Simple Custom CSS and JS \/* override styles when printing *\/ @media print { @page { margin: 2cm; @top-center { font-family: sans-serif; font-weight: bold; font-size: 2em; content: counter(page); } } \/* target the first\u2026","rel":"","context":"In &quot;Tricks&quot;","block_context":{"text":"Tricks","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/tricks\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9782,"url":"https:\/\/monodes.com\/predaelli\/2022\/11\/05\/digitize-books-searchable-ocr-pdf-with-text-overlay-from-scanned-or-photographed-books-on-linux-michael-franzl\/","url_meta":{"origin":11737,"position":5},"title":"Digitize books: Searchable OCR PDF with text overlay from scanned or photographed books on Linux &#8211; Michael Franzl","author":"Paolo Redaelli","date":"2022-11-05","format":false,"excerpt":"Step-by-step tutorial to digitize books. Produce searchable OCR PDFs with a selectable text overlay from a hardcopy book using Linux free software. Source: Digitize books: Searchable OCR PDF with text overlay from scanned or photographed books on Linux - Michael Franzl","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/11737","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=11737"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/11737\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=11737"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=11737"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=11737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}