Skip to content

Remaining physical left/right offsets break RTL in several components #420

Description

@czarandy

Problem

Most of the library uses logical properties and _rtl mirroring, but an audit found remaining physical left/right offsets that misplace elements under dir="rtl":

  • src/components/CodeBlock/CodeBlock.recipe.ts:95 — copy button pinned right: '3'
  • src/components/Thumbnail/Thumbnail.recipe.ts:63 — overlay pinned right: '1'
  • src/components/Avatar/Avatar.tsx:220 — status dot positioned with physical right
  • src/components/Calendar/Calendar.recipe.ts:172,182 — range-endpoint pill caps use physical left/right, so rounded caps land on the wrong ends in RTL
  • src/components/Lightbox/Lightbox.recipe.ts:140-141 — prev/next nav buttons positioned physically (their icons already mirror via LogicalChevron*, so icon and position disagree)
  • src/components/TagsInput/TagsInput.tsx:655left: 'anchor(start)'

(Symmetric left:0; right:0 pairs elsewhere are fine and out of scope. TreeView's RTL problems are tracked separately.)

Expected

These elements mirror correctly under dir="rtl", consistent with the rest of the library.

Suggested fix

Migrate each to logical equivalents (insetInlineEnd, insetInlineStart, logical border radii for the Calendar pills). Verify with RTL Storybook examples for each affected component.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmediumApproximately medium amount of work

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions