Flex icon indicating copy to clipboard operation
Flex copied to clipboard

Add bidi support

Open Ds886 opened this issue 1 year ago • 8 comments

Hello, I was trying to use this theme but encountered an issue with post that contain both Hebrew and English

I was able to add the support by changing the css to include

unicode-bidi:plaintext
text-align:start

I've added it just for headers and p since it wasn't obvious how the cascading was working, and it seems to localize the damage. the endresult seems good enough for my usecase but probably you would want to use it page wide and further testing(haven't done much with web ui)

Without it would look like image

with it appears to be correct with the following final output image

testing in MDN in their demo other values seems to get the general directionality but result in punctuation marks shifting to the start which is incorrect.

Ds886 avatar Jan 27 '23 19:01 Ds886

Now testing it does create some awkward overriding when needing to customize or around quotation so not sure if it is the best approach image

> <center>נכתב פה עיר מלוכה ווינא</br>יום ה" כ"ז לחדש תשרי</br> שנת חמשת אלפים</br><span style="font-size: 1.5em">תרי"א</span></br>לבריאת</br>עולם</center>

also minor but is there a way to shift the quotation line to the right? image

Ds886 avatar Jan 27 '23 23:01 Ds886

Hi, you or someone else is free to send a PR.

This theme was built around English and other Latin-based languages; anything beyond that is beyond my knowledge and not currently supported.

alexandrevicenzi avatar Jan 30 '23 09:01 alexandrevicenzi

Thanks for the response and it is understandable.

I'll stress the changes for the text flow and check for edge cases that spawn from it in the meantime.

On a sidenote and a bit far from now but is there a preferable way and interest to provide test cases of what is the expected result visually? If so what are they?

Ds886 avatar Feb 05 '23 21:02 Ds886

The only thing is not to break other functionality. There are no test cases for such cases, only for code.

alexandrevicenzi avatar Feb 06 '23 09:02 alexandrevicenzi

Hi, would you consider implementing this in Flex 3.0?

The changes are being done in v3 branch, but it will take some time to be ready.

alexandrevicenzi avatar Mar 31 '23 22:03 alexandrevicenzi

Hello, Sure, I'll give it a better look from my side

If it is not a problem do you have a pointer on how to generate the minified CSS? Last I've tried I had to change it in the minified version since the mechanism was a bit more obscure which I guess won't work as a general solution.

BR

On Sat, 1 Apr 2023, 01:52 Alexandre Vicenzi, @.***> wrote:

Hi, would you consider implementing this in Flex 3.0?

— Reply to this email directly, view it on GitHub https://github.com/alexandrevicenzi/Flex/issues/324#issuecomment-1492694686, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ5PCA7DHXDZP4S3TYOB7LW65NY7ANCNFSM6AAAAAAUJCM5SM . You are receiving this because you authored the thread.Message ID: @.***>

Ds886 avatar Mar 31 '23 23:03 Ds886

Hi,

v3 will remove Less and any other pre-processors, it will be plain CSS. I will try to push the changes next week.

alexandrevicenzi avatar Apr 01 '23 20:04 alexandrevicenzi

Hello, started messing with it a bit , Ill give it a few more tests. Outside of list autogenerated in a non-overridable manner so the numbering stays LTR I was able to resolve most It seems to generally work but ill give it more look, had some weird cache issue in firefox.

Edit: I just checked on firefox whatever issue I've had seems to resolve itself I don't see any obvious issue

Ds886 avatar Apr 08 '23 08:04 Ds886