Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing RTL Direction in Quasar Components #17338

Closed
mohamad68 opened this issue Jun 30, 2024 · 2 comments
Closed

Implementing RTL Direction in Quasar Components #17338

mohamad68 opened this issue Jun 30, 2024 · 2 comments
Labels
area/cli bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 Qv2 🔝 Quasar v2 issues

Comments

@mohamad68
Copy link

What happened?

I have configured my project with RTL as the default direction. using Quasar framework and PostCSS with rtlcss. I'm encountering an unintended behavior where styles such as margin-right are automatically converted to margin-left. This is not the desired outcome for my project.
image

What did you expect to happen?

i am seeking guidance on how to exclusively adjust the direction of Quasar's built-in components to RTL without affecting other styles or functionalities in my application.

Reproduction URL

https://codepen.io/mohamad/pen/abrrLML?editors=1010

How to reproduce?

1-Added rtlcss to the PostCSS configuration.
2-Specified lang="fa-ir" in the Quasar configuration.
3-Set dir="rtl" on the HTML tag.

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite)

Platforms/Browsers

Chrome

Quasar info output

No response

Relevant log output

No response

Additional context

No response

@mohamad68 mohamad68 added kind/bug 🐞 Qv2 🔝 Quasar v2 issues labels Jun 30, 2024
@github-actions github-actions bot added area/cli bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite labels Jun 30, 2024
@rstoenescu
Copy link
Member

Please follow the guide at https://quasar.dev/options/rtl-support
Notice that you also need to configure Quasar with an RTL Quasar language pack.

image

@mohamad68
Copy link
Author

@rstoenescu
First, thank you for your response. The configuration you mentioned does indeed transform the code to RTL, but my aim is to write RTL code directly, without relying on transformations. The issue I'm encountering is that Quasar components are inherently coded in LTR, and they only switch to RTL through transformation.

To clarify, if I want to use Quasar components in RTL, I am forced to apply the transformation using the guidelines you've provided. However, this approach affects all the code, not just the Quasar components, which isn't what I want.

Unfortunately, due to this issue, the usage of the Quasar framework is quite rare in countries that primarily use RTL languages.

For a better understanding, I suggest creating a project and trying to code with an RTL base directly, so you can see the challenge in action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 Qv2 🔝 Quasar v2 issues
Projects
None yet
Development

No branches or pull requests

2 participants