Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/fix-buttongroup-rtl-spacing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@rocket.chat/fuselage': patch
---

fix(fuselage): ButtonGroup margin spacing in RTL mode

Fixed ButtonGroup RTL spacing by adding explicit `[dir='rtl']` overrides for first and last child margins. The postcss-logical plugin was converting CSS logical properties to physical properties (margin-left/right) without generating proper RTL fallback rules, causing incorrect spacing in RTL layouts.
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,36 @@

&:first-of-type {
margin-inline-start: lengths.margin(none);

[dir='rtl'] & {
margin-inline-end: lengths.margin(none);
margin-inline-start: lengths.margin(4);
}

.rcx-button-group--small[dir='rtl'] & {
margin-inline-start: lengths.margin(2);
}

.rcx-button-group--large[dir='rtl'] & {
margin-inline-start: lengths.margin(8);
}
}

&:last-of-type {
margin-inline-end: lengths.margin(none);

[dir='rtl'] & {
margin-inline-start: lengths.margin(none);
margin-inline-end: lengths.margin(4);
}

.rcx-button-group--small[dir='rtl'] & {
margin-inline-end: lengths.margin(2);
}

.rcx-button-group--large[dir='rtl'] & {
margin-inline-end: lengths.margin(8);
}
}

.rcx-button-group--wrap > & {
Expand Down
Loading