brackets displays wrongly for right to left display style brackets displays wrongly for right to left display style google-chrome google-chrome

brackets displays wrongly for right to left display style


You just need to add the LRM character after the last bracket. HTML entity: ‎

<html dir="rtl"><body><p>hello (world)&#x200E;</p></body></html>

This tells the browser to interpret the brackets as left-to-right reading.


Or better you can try in CSS

*:after {    content: "\200E‎";}


Adding the special rlm character in css before and after your element solved all cases I've come across in Firefox and Chrome:

*:after {    content: "\200E‎";}*:before {    content: "\200E‎";}