# RTL (Right-to-Left) Text Alignment Issue with Table of Contents Component in Farsi

**URL:** https://meta.discourse.org/t/rtl-right-to-left-text-alignment-issue-with-table-of-contents-component-in-farsi/373560
**Category:** Bug
**Tags:** pr-welcome, disco-toc, ux, rtl
**Created:** [July 9, 2025, 2:15pm UTC](https://meta.discourse.org/t/rtl-right-to-left-text-alignment-issue-with-table-of-contents-component-in-farsi/373560 "2025-07-09T14:15:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![serkhelesheyi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/serkhelesheyi/32/497726_2.png) [@serkhelesheyi](https://meta.discourse.org/u/serkhelesheyi)
#### Post date: [July 9, 2025, 2:15pm UTC](https://meta.discourse.org/t/rtl-right-to-left-text-alignment-issue-with-table-of-contents-component-in-farsi/373560/1 "2025-07-09T14:15:39Z")

</div>

![The image displays a list of text-based features and questions related to a table of contents (TOC) component on a dark background, with a 'Jump to end' link at the bottom. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/d/f/a/dfa9c28c769e65f2f70296db378b813acf5e4e6e.png)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/5/a/2/5a257c8e04a4a7042dfc646b1993bfd807728471.png)

I’m using the Table of Contents (TOC) component in my Discourse forum, and I’ve noticed an alignment issue when the forum language is set to Farsi (Persian), which is a Right-to-Left (RTL) language.

**Problem Description:**

When viewing a topic with the TOC component enabled in Farsi, the text of the headings in the TOC sidebar appears to be “stuck” or have zero padding/margin from the vertical line on the right side. This contrasts with the English (Left-to-Right - LTR) display, where there is a noticeable and appropriate left padding/margin from the vertical line.

This lack of spacing makes the Farsi TOC less visually appealing and somewhat harder to read, as the text butts directly against the vertical separator.

**Expected Behavior:**

Could this be investigated and potentially addressed in a future update? This would greatly improve the user experience for RTL language users.

Thank you for your time and assistance!

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [July 10, 2025, 6:37am UTC](https://meta.discourse.org/t/rtl-right-to-left-text-alignment-issue-with-table-of-contents-component-in-farsi/373560/2 "2025-07-10T06:37:09Z")

</div>

Thanks for reporting, putting a #pr-welcome on this for now 🤗
