Moddis
Active member
The recent addition in in xenforo.css caused unwanted alignment issues is one of custom style installation.
That line inserted a "text-align:left" for a block that was supposed to be centered aligned due to its parent(if you have the ".messageUserBlock h3.userText" centered, you would see the issue in latest update). Of course I can now add my own style to each of the children(e.g. ".username") and force them to center align, but that takes a lot of customization since changes also need to me made to different @media sizes as well.
I did further research and noticed that auto attribute is only recommended if the text direction is truly unknown. Since XenForo always knows which direction the text is meant to be read from based on the setting "$pageIsRtl" (located in your Language options), wouldn't it make sense to specify the direction based on the user setting instead of just using "auto"? Like so:
When I manually made the change above and tested the layout using the left-to-right and right-to-left Text Direction setting, all worked great and I didn't notice any inconveniences alignment issues.
Code:
[dir=auto] { rtl-raw.text-align: {xen:if $pageIsRtl, right, left}; }
That line inserted a "text-align:left" for a block that was supposed to be centered aligned due to its parent(if you have the ".messageUserBlock h3.userText" centered, you would see the issue in latest update). Of course I can now add my own style to each of the children(e.g. ".username") and force them to center align, but that takes a lot of customization since changes also need to me made to different @media sizes as well.
I did further research and noticed that auto attribute is only recommended if the text direction is truly unknown. Since XenForo always knows which direction the text is meant to be read from based on the setting "$pageIsRtl" (located in your Language options), wouldn't it make sense to specify the direction based on the user setting instead of just using "auto"? Like so:
Code:
[dir={xen:if $pageIsRtl, rtl, ltr}] { rtl-raw.text-align: {xen:if $pageIsRtl, right, left}; }
When I manually made the change above and tested the layout using the left-to-right and right-to-left Text Direction setting, all worked great and I didn't notice any inconveniences alignment issues.