#41 Apply word break to page for words that don't fit within the available space
Opened 3 years ago by kaylee20. Modified 3 years ago
fedora-docs/ kaylee20/fedora-docs-ui Improvement  into  master

file modified
+4
@@ -272,6 +272,10 @@ 

    content: attr(title);

    hyphens: none;

  }

+ .doc th.tableblock,

+ .doc td.tableblock {

+   word-break: break-word; /* overflow-wrap for table cells; gives space higher precedence than hyphen opportunity */

+ }

  

  .doc .imageblock {

    display: flex;

file modified
+6 -2
@@ -6,6 +6,10 @@ 

    .main {

      flex: auto;

      /* min-width: 0 required for flexbox to constrain overflowing elements */

-     min-width: 0;

-   }

+       word-wrap: break-word; /* also known as overflow-wrap*/

+       min-width: 0;

+     }

+     

+     

+   

  }

If a word (really a sequence of non-space characters) cannot fit within the available space (i.e., a single line), and hyphens are either disabled or don't apply, that particular word will be forced to break.
The solution has two parts;
- word-wrap: break-word globally
- word-break: break-word in table cells

Signed-off by Oyelakin Mercy oyelakinmercy68@gmail.com

rebased onto 759d0b1

3 years ago

this may be more beautiful, but have a negative impact on screen readers and accessibility.
It may also negatively impact Asiatic languages.

I suggest not to merge.

Metadata