Indicate which themes and components are safe to use with RTL locales

AI-generated summary

The core Discourse code supports RTL locales through the RTLcss gem, which flips the CSS files. However, theme CSS is not flipped, potentially causing issues for RTL sites. To address this, simon suggests testing official themes and theme components against RTL locales and marking them as safe to use if compatible. Adjustments can be made to theme CSS by adding rules for the .rtl class. Ideally, this process should be reviewed by someone familiar with reading RTL text to catch both major and minor issues.

Continuing the discussion from Reply button doesn't work any more after recent update:

I wrote up a general summary of the issue here: Can it be done with CSS? Grouping categories on category page - #13 by simon.

The core Discourse code is intended to work with RTL locales. This is mainly achieved by flipping the Discourse CSS files with the RTLcss gem. CSS for themes and theme components is not flipped. This could potentially result in unexpected issues for RTL sites.

Would it make sense to test official themes and theme components against RTL locales? If needed, some adjustments could be made to theme CSS by adding rules for the .rtl class. Official themes and theme components could then be marked as safe to use for RTL locales.

Ideally this would be looked at by someone who is used to reading RTL text. Looking at it from the position of an RTL reader, I can notice glaring issues, but it’s hard to notice the types of minor issues that would be obvious to me in a LTR layout.

I’m partly pointing this out because there have been some (non CSS) RTL issues in the core Discourse code for some time now: Positioning issues with RTL locales after recent updates.

3 Likes