Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #35219
Closed
Open
Issue created Oct 18, 2021 by Administrator@rootContributor3 of 3 checklist items completed3/3 checklist items

RTL not supported in pre and code tags

Created by: AhmedElTabarani

Prerequisites

  • I have searched for duplicate or closed issues
  • I have validated any HTML to avoid common problems
  • I have read the contributing guidelines

Describe the issue

I posted an issue here #35218 (closed) that I thought was a typo in the docs But when I tested it, I found that Bootstrap doesn't support pre tag and code tag

Code

<!DOCTYPE html>
<html lang="ar" dir="rtl">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />

    <link
      rel="stylesheet"
      href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.rtl.min.css"
      integrity="sha384-gXt9imSW0VcJVHezoNQsP+TNrjYXoGcrqBZJpry9zJt8PCQjobwmhMGaDHTASo9N"
      crossorigin="anonymous"
    />
  </head>
  <body>

    <pre>مرحبا بالعالم!</pre>
    <code>مرحبا بالعالم!</code>

  </body>
</html>

Output image

The output above is wrong is shown ملاعلاب ابحرم! and the right sentence is !مرحبا بالعالم It's like saying "dlroW olleH" instead of "Hello World"

if i run same code without the bootstrap link, everything will be fine

<!DOCTYPE html>
<html lang="ar" dir="rtl">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
  </head>
  <body>
    <pre>مرحبا بالعالم!</pre>
    <code>مرحبا بالعالم!</code>
  </body>
</html>

like this image

and this is the right sentence

Reduced test cases

https://user-images.githubusercontent.com/69223584/137766219-2b05d55c-c668-408e-8aa7-7ed7389c9cba.mp4

What operating system(s) are you seeing the problem on?

Windows

What browser(s) are you seeing the problem on?

Chrome

What version of Bootstrap are you using?

5.0.2

Assignee
Assign to
Time tracking