rtl-styling
rtl-styling copied to clipboard
RTL style for code blocks?
Hi,
We implemented recently RTL support in Docusaurus and one of our early adopter gave this feedback:
Another point the direction of the codeblocks, they should be LTR
https://datagit.ir/docs/python/beginner/functions/function
The user added this custom CSS:
.codeBlockContent {
direction: ltr !important;
}
I wasn't able to find a section about code blocks in the guide to help me figure out if I should hardcode all code blocks to LTR or not in the framework, or if RTL code blocks may make sense occasionally according to the code language or something?
My guess is that we should rather default to LTR and let the user use RTL opt-in eventually?
Currently rendering in RTL looks quite weird on Docusaurus :D
In such case where the code block has a title (may be a file path or a RTL language title), should the title be RTL or LTR ? Can it make sense to have the title RTL and code block LTR, and have some weird alignment?
Please let me know what you think ;)