Skip to content

Files

Latest commit

 

History

History
30 lines (24 loc) · 1.45 KB

5ffb01b21e3e3f6db4eb6404.md

File metadata and controls

30 lines (24 loc) · 1.45 KB
title date submitter number tags discussion status related
I want better french typography support
2021-01-10 13:31:30 UTC
PRIVATE
5ffb01b21e3e3f6db4eb6404
internationalization
discussing
title url type
Unicode Line Breaking Algorithm
spec

Browsers localize automatically quotation marks if a lang attribute is provided which is great, but we can do much more to enhance and simplify experience of developers but also authors on the web.

In French, exclamation and question mark both require a non-breaking space before them, on the contrary of English. Often, people on the web use normal space which create orphan sign at the end of a new line.

Currently, developers aware of this problem solve it by:

  • Replacing space characters before ! and ! in text with   or \xa0
  • Using white-space: nowrap; CSS property and adding an HTML element encompassing the last word and the sign ! or ? of a sentence
  • Use no space

Some links to illustrate the issue:

HTML authoring in French Whitespace before some punctuation characters in French: is there a CSS way to avoid lines breaking? - Stack Overflow Space Yourself