RTL Styling 101

A couple of weeks ago I was super excited about publishing my first CSS-Tricks post: “Letter Spacing is Broken. Forget about that though, what’s important is the post’s topic: letter spacing is broken and doesn’t work as the CSS


RTL Styling 101 originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.


This content originally appeared on CSS-Tricks and was authored by Juan Diego Rodríguez

A couple of weeks ago I was super excited about publishing my first CSS-Tricks post: “Letter Spacing is Broken. Forget about that though, what’s important is the post’s topic: letter spacing is broken and doesn’t work as the CSS Specification says it should. In a nutshell, instead of spacing the characters evenly, it leaves an unpleasant space at the end of the element.

While this inconsistency between the web and the spec is just a quirk for a Spanish/English speaker like me, for speakers of right-to-left (RTL) languages like Arabic or Hebrew, an annoying space is left at the start or end of a word. Firefox (Gecko) kinda fixes it and rearranges the unnecessary space at the end (in the reading order), but Google and Safari (Blink and Webkit) leave it at the start.

Side-by-side comparison of letter spacing on Gecko and Blink/Webkit

Of course, I wanted to demo this major pain point, but styling RTL content was beyond my CSS power. That’s when I found this life-saver guide by Ahmad Shadeed that covers every major aspect of styling RTL content on the web and best practices to easily internationalize an LTR webpage. A resource that, I think, is a must-read if you are interested in i18n and accessibility in the web.

I may have discovered warm water since this guide goes back to 2018, but I hope those like me who didn’t know about it have fun learning something new!


RTL Styling 101 originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.


This content originally appeared on CSS-Tricks and was authored by Juan Diego Rodríguez


Print Share Comment Cite Upload Translate Updates
APA

Juan Diego Rodríguez | Sciencx (2024-08-20T14:16:34+00:00) RTL Styling 101. Retrieved from https://www.scien.cx/2024/08/20/rtl-styling-101-2/

MLA
" » RTL Styling 101." Juan Diego Rodríguez | Sciencx - Tuesday August 20, 2024, https://www.scien.cx/2024/08/20/rtl-styling-101-2/
HARVARD
Juan Diego Rodríguez | Sciencx Tuesday August 20, 2024 » RTL Styling 101., viewed ,<https://www.scien.cx/2024/08/20/rtl-styling-101-2/>
VANCOUVER
Juan Diego Rodríguez | Sciencx - » RTL Styling 101. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/08/20/rtl-styling-101-2/
CHICAGO
" » RTL Styling 101." Juan Diego Rodríguez | Sciencx - Accessed . https://www.scien.cx/2024/08/20/rtl-styling-101-2/
IEEE
" » RTL Styling 101." Juan Diego Rodríguez | Sciencx [Online]. Available: https://www.scien.cx/2024/08/20/rtl-styling-101-2/. [Accessed: ]
rf:citation
» RTL Styling 101 | Juan Diego Rodríguez | Sciencx | https://www.scien.cx/2024/08/20/rtl-styling-101-2/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.