Making Brand Header RTL compatible

How can we make this component to be compatible with RTL websites?

Few CSS customization can make this RTL compatible. I will work on it.

4 Likes

The component is not compatible with rtl websites. What should we do?

I tried it before. But it demanded more changes than I expected. Itā€™s not in my current roadmap. pr-welcome.

3 Likes

I can submit a PR however I just donā€™t know how can I get the direction of discourse as a variable in theme component.

1 Like

In RTL layout <html> tag will include the CSS class rtl. You can do the customization based on it. If needed you can also check it in JS code by calling const isRTL = $("html").hasClass("rtl");.

1 Like

Sorry I didnā€™t understand you correctly. I just need to add a variable in common.scss file that indicates discourse global direction. I didnā€™t find such variable here:

If I have that variable in common.scss the customization would be pretty straightforward. Otherwise I donā€™t know how to do it.

Yes, we donā€™t have a global CSS variable I guess. You should check rtl.scss file to understand howto customize.

I submitted a pr

3 Likes

Itā€™s merged. Thanks for the PR :heart:.

5 Likes