mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-06-19 05:35:40 +08:00
The external link icon (up-right-from-square) on topic featured links was not RTL-aware in two ways: 1. The icon itself wasn't mirrored — it pointed top-right in both LTR and RTL. Added it to the scaleX(-1) flip list in rtl.scss so it mirrors to top-left in RTL contexts. 2. The icon's spacing used a physical `margin-right` which placed the gap on the wrong side in RTL. Switched to `margin-inline-end` so it respects text direction. **LTR** <img width="374" height="221" alt="2026-04-01 @ 12 57 16" src="https://github.com/user-attachments/assets/d3ec17de-4fff-4305-bca5-dfaf36b6287c" /> **RTL (before)** <img width="353" height="201" alt="2026-04-01 @ 12 59 16" src="https://github.com/user-attachments/assets/ce39b733-8a99-4c14-a90f-cdfdd417a365" /> **RTL (after)** <img width="340" height="197" alt="2026-04-01 @ 12 58 23" src="https://github.com/user-attachments/assets/513e6848-7dfa-460f-adda-ef3c4ede2e08" /> https://meta.discourse.org/t/397432
42 lines
905 B
SCSS
Vendored
42 lines
905 B
SCSS
Vendored
// Right to left styles.
|
|
.rtl {
|
|
.d-icon-align-right,
|
|
.d-icon-angles-right,
|
|
.d-icon-angle-right,
|
|
.d-icon-arrow-right,
|
|
.d-icon-caret-right,
|
|
.d-icon-chevron-right,
|
|
.d-icon-hand-point-right,
|
|
.d-icon-quote-right,
|
|
.d-icon-align-left,
|
|
.d-icon-angles-left,
|
|
.d-icon-angle-left,
|
|
.d-icon-arrow-left,
|
|
.d-icon-caret-left,
|
|
.d-icon-chevron-left,
|
|
.d-icon-hand-point-left,
|
|
.d-icon-quote-left,
|
|
.d-icon-reply,
|
|
.d-icon-up-right-from-square {
|
|
transform: scaleX(-1);
|
|
}
|
|
}
|
|
|
|
// For the support_mixed_text_direction setting
|
|
html:not(.rtl) .cooked ul[dir="rtl"],
|
|
html:not(.rtl) .d-editor-preview ul[dir="rtl"],
|
|
.rtl .cooked ul[dir="ltr"],
|
|
.rtl .d-editor-preview ul[dir="ltr"] {
|
|
padding-left: 0;
|
|
padding-right: 1.25em;
|
|
margin-right: 1.25em;
|
|
}
|
|
|
|
.rtl .ace_placeholder {
|
|
direction: rtl !important;
|
|
text-align: right !important;
|
|
|
|
[dir="ltr"] {
|
|
text-align: left !important;
|
|
}
|
|
}
|