Skip to content
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

Don't override CSS direction in code elements #35230

Merged
merged 2 commits into from
Oct 29, 2021
Merged

Conversation

ffoodd
Copy link
Member

@ffoodd ffoodd commented Oct 20, 2021

Fixes #35219

RTL users can now use the dir attribute if they need to display LTR code, but we don't assume this as a default anymore.

Copy link

@ebraminio ebraminio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, some others tweaks can be done afterward but this should be done first and as soon as possible.

@ffoodd
Copy link
Member Author

ffoodd commented Oct 26, 2021

Thanks! Could you elaborate why unicode-bidi: isolate might be a better option than dropping it entirely? The Webkit issue you linked does not make much sense to me.

@ebraminio
Copy link

ebraminio commented Oct 26, 2021

Thanks! Could you elaborate why unicode-bidi: isolate might be a better option than dropping it entirely?

Can we have this first in then discuss that if necessary? I really didn't want to open the discussion for it here, what I really meant isolate is just better than bidi-override and didn't oppose removing this altogether. I thought that was the original intention that's why I went for it initially.

The Webkit issue you linked does not make much sense to me.

The attached image in the WebKit bug shows the issue, to recreate it here say someone writes the following,

Abcasd <code>"شسی"</code> = <code>$1</code>

It will result in:

Abcasd "شسی" = $1

But using isolate or something alike turns it to this which obviously is the intention:

Abcasd "شسی" = $1

Ofc whether unicode-bidi: embed; should be used here or unicode-bidi: isolate; can be a bit controversial (but both are good, better than bidi-override or not setting it) but bootstrap can always hand the decision about it to the clients.

@mdo mdo changed the title Do not override code blocks direction in CSS Don't override CSS direction in code elements Oct 27, 2021
@XhmikosR XhmikosR merged commit 989de20 into main Oct 29, 2021
@XhmikosR XhmikosR deleted the main-fod-rtl-codeblocks branch October 29, 2021 06:00
AntonKhorev added a commit to AntonKhorev/openstreetmap-website that referenced this pull request Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RTL not supported in pre and code tags
4 participants