Skip to content

BUG: codeblock on RTL locale puts copy button on the left while code is also on the left #8792

Closed

Description

@YoniChechik

Have you read the Contributing Guidelines on issues?

Prerequisites

Description

codeblock on RTL locale puts copy button on the left while code is also on the left.

This is my current hack to fix this

/*RTL hack! the copy botton of CodeBlock is set incorrectly, thiis is how to fix it*/
/*for dev*/
.buttonGroup_node_modules-\@docusaurus-theme-classic-lib-theme-CodeBlock-Content-styles-module {
  left: 0.5rem !important;
  right: unset !important;
}
/*for prod*/
.buttonGroup__atx {
  left: 0.5rem !important;
  right: unset !important;
}

Reproducible demo

No response

Steps to reproduce

some RTL local with code block

Expected behavior

copy button shold stay on the right

Actual behavior

copy button is on the left

Your environment

No response

Self-service

  • I'd be willing to fix this bug myself.

Activity

  1. added
    bug
    status: needs triage
    on Mar 19, 2023
  2. added
    domain: theme
    and removed
    status: needs triage
    on Mar 19, 2023
  3. Vishruta-Patil commented on Mar 20, 2023

    @Vishruta-Patil
    Contributor

    @Josh-Cena Can I work on this issue ?

  4. Josh-Cena commented on Mar 20, 2023

    @Josh-Cena
    Collaborator

    @Vishruta-Patil Yes, you can directly send a PR

  5. Vishruta-Patil commented on Mar 21, 2023

    @Vishruta-Patil
    Contributor

    @Josh-Cena I have setup the project locally but can you tell me where can I find RTL locale with the code block.

  6. Josh-Cena commented on Mar 21, 2023

    @Josh-Cena
    Collaborator

    You need to start the website with an RTL locale, such as fa or ar. You need to modify the config file and then run start with --locale ar.

  7. Josh-Cena commented on Mar 23, 2023

    @Josh-Cena
    Collaborator

    Fixed by #8803. @Vishruta-Patil next time, please read the PR template carefully. There's a checklist item that asks you to fill in the issue number you are fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdomain: theme

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions