-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
reboot styles breaks rtl text direction alignment #28238
Comments
Closed
MartijnCuppens
added a commit
that referenced
this issue
Jul 4, 2019
This was causing issues for RTL, see #28238
MartijnCuppens
added a commit
that referenced
this issue
Jul 14, 2019
This was causing issues for RTL, see #28238
XhmikosR
pushed a commit
that referenced
this issue
Jul 15, 2019
This was causing issues for RTL, see #28238
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current behavior
Bootstrap reboot sets
text-align:left
on thebody
HTML element which in turn negates all effects of settingdir=rtl
attribute ORdirection
CSS property on an element.Expected behavior
Setting text direction as right-to-left on elements should change the text direction and align it to the right (viz. the default browser behavior on all supported browsers).
Workaround
Set the value of CSS property
text-align
toinitial
for an element fixes on most modern browsers. On browsers which do not supportinitial
, explicitly setting the value toright
fixes the issue.Background
Issue #24807 tracks the rtl language support within bootstrap as an enhancement feature; however the current reboot behavior breaks the default semantics for CSS. Making bootstrap components work with
rtl languages is an enhancement feature, however breaking the syntax and flow direction of plain text content seems to be a bug.
Additional cases to consider:
text-align
onbody
tag leads to CSS specificity wars and IE hacks.text-align:left
on the body with CSS vs. setting it for individual components/controls is not apparent from the code comments. ref original commit. This makes it hard to figure if this behavior is intended for the current bootstrap version OR a new reset for thedirection
attribute be provided as part of the reboot code.Environment
The text was updated successfully, but these errors were encountered: