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
problem with RTL code generation #6714
Comments
Hello, sorry to be so late with the reply. |
Hello, no problem at all, thanks for replying. Solution 1It appears that quasar is depending on rtlcss postcss plugin rather than rtlcss itself. after reading the rtlcss and the postcss plugin documentation, I came with an idea, Ignore every lines of CSS that should not be transformed as documented in rtlcss and quasar itself. code snipped to ignore rules as documented in RTLCSS:
code snipped to ignore rules as documented in Quasar (SCSS version):
one thing to note here, the css version will not work on SCSS version, somthing like this, won't work:
also, these versions won't work too, (note the scss loud comment syntax):
probably an issue, if the scss is pre-proccesd to css, these should work too, moving on with the version described in quasar docs. as we know, this is not practical at scale, but there was an other option in rtlcss documentation, ignore CSS rules by specifying an ignore block.
but this option, wont work in Quasar, and is not documented in Quasar docs. there were several closed issues on this problem too :
but, if there way a way to make this work, we would have one more problem to face. there are limitation on how we can use this "ignore block" feature. there is currently no way to ignore files, instead of css rules. on to the next solution then. Solution 2thinking about the problem again, I've found out that the root of the problem is one thing, quasar RTL code generation logic is based on a crucial fact, that I, as a developer, am building a web app which is LTR and also, I want RTL transformed version too.
so finding what I exacly wanted, I tried to apply this config. after some research on extending config of postcss plugins, I did this change on
hoping that this change would solve it all, after restarting quasar app, i noticed that my styles were not being wrongly modified, but quasar styles won't be transform too. so all of the quasar components returned to their original LTR mode. this behavior was expected, there is no RTL-ready version of Quasar, the styles are all being transformed by the previous config, so changing the config would conflict with behavior of quasar itself. IMO, using
so in this (long :D) reply, i would suggest two new solutions:
I think both these solutions on themselves, while solving this particular problem, would introduce a new problem. |
Hello, can you check if this syntax does work? #{"/* rtl:begin:ignore */"}
.code {
direction:ltr;
text-align:left;
}
#{"/* rtl:end:ignore */"} Meanwhile I'll try to think of something and ask for support from postcss-rtl. |
Hi, just checked this syntaxt: #{"/* rtl:begin:ignore */"}
.code {
direction:ltr;
text-align:left;
}
#{"/* rtl:end:ignore */"} results in :
also checking this syntax: .code {
#{"/* rtl:begin:ignore */"}
direction:ltr;
text-align:left;
#{"/* rtl:end:ignore */"}
} results the same error. |
Hello Again @pdanpdan
Or
let me explain them a little more, so that I could express what is it that i'm thinking of. a two step transformationlet's assume that we got a new config rule in a second step that would compile the userland style files (sass, scss, ...) to corresponding direction, based on Shipping separate RTL and LTR versions of Quasar styles.by this I mean that as a build step of framework, before shipping it to register, we could use postcss-rtl on it self and generate the RTL version, and then based on the unfortunately, this problem has a very negative effect. RTL language web apps (arabic, persian, azeri, hebrew and more) can't be developed using quasar (unless developer is only using the quasar components - no other third party components and would bear the pressure of explicitly inserting ignore rules.) I personally became engaged with this problem when i was trying to use third party tables and everything about the direction was wrong. there was no workaround or anything. i had to fallback on using quasar table instead (which i'm really happy with) but no framework is perfect and developer would one day need an other third party library that this wrong style generation would conflict with that library and making it impossible to work with (I can show some of my experiences when working with them). |
…rframework#6714, quasarframework#7488 Usage: set rtl to { fromRTL: true } in quasar.conf
…rframework#6714, quasarframework#7488 Usage: set rtl to { fromRTL: true } in quasar.conf
…rframework#6714, quasarframework#7488 Usage: set rtl to { fromRTL: true } in quasar.conf
…rframework#6714, quasarframework#7488 Usage: set rtl to { fromRTL: true } in quasar.conf
…rframework#6714, quasarframework#7488 Usage: set rtl to { fromRTL: true } in quasar.conf
…rframework#6714, quasarframework#7488 Usage: set rtl to { fromRTL: true } in quasar.conf
…rframework#6714, quasarframework#7488 Usage: set rtl to { fromRTL: true } in quasar.conf
…rframework#6714, quasarframework#7488 Usage: set rtl to { fromRTL: true } in quasar.conf
…rframework#6714, quasarframework#7488 Usage: set rtl to { fromRTL: true } in quasar.conf
…rframework#6714, quasarframework#7488 Usage: set rtl to { fromRTL: true } in quasar.conf
@pdanpdan any news on this? still waiting for this to be merged, is there any problem that i could help with? |
…rframework#6714, quasarframework#7488 Usage: set rtl to { fromRTL: true } in quasar.conf
Enhancement will be available in "@quasar/app" |
Hello, I tried these and none of them work:
|
Describe the bug
Hello. according to the well written Quasar documents, to support RTL mode, language pack and RTL flag must be added to the config file.
as i was reading this repository issues I found out that 'rtlcss' module was taking responsibility for adding RTL converted code and i couldn't find anyway to configure it. i am developing a first RTL website (mainly rtl with no ltr support in mind) and i dont need this module to generate any code for me. but i cant set the RTL flag ( in the config file ) to false, because the components visual behavior depend on it. there is a way to disable one css rule at a time but, adding this "ignore rule" to every line of the code is frustrating.
is there anyway to disable this code generation but still keep the RTL behavior of the components ?
Thanks in advance :)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
There should be an option to make rtlcss module, stop generating unwanted code OR providing a new Object as the config for rtl support in Quasar.config for additional control over this convertion.
The text was updated successfully, but these errors were encountered: