Commit 47c85b6b539 for woocommerce
commit 47c85b6b5392d96878f98113d78da7a642b7ff81
Author: Rudrakshi Gupta <109859631+rudrakshi-gupta@users.noreply.github.com>
Date: Fri Nov 27 14:27:25 2026 +0530
Fix misplaced buttons and arrows on the Payments settings page in RTL (#71448)
* Fix RTL layout of the Payments settings page
The hand-written html[dir="rtl"] overrides were mirrored again by the
RTL stylesheet build, which put the margin back on the wrong side. The
action buttons, the offline payments arrow and the business location
chevron ended up next to the text instead of at the end of the row.
Remove the overrides and rely on the generated RTL stylesheet.
Fixes #71416
* Keep long search text clear of the country selector's clear button
The padding-right on the search input never took effect: WordPress
core's input[type="text"] padding outranks a single class. The removed
html[dir="rtl"] block had been the only rule strong enough to apply it,
in RTL only, so long names ran under the clear button in both
directions.
Move the padding to a selector that outranks core's, and let the RTL
build mirror it. Drop the padding-right in &--input that never applied.
---------
Co-authored-by: Oleksandr Aratovskyi <79862886+oaratovskyi@users.noreply.github.com>
diff --git a/plugins/woocommerce/changelog/fix-71416-payments-settings-rtl b/plugins/woocommerce/changelog/fix-71416-payments-settings-rtl
new file mode 100644
index 00000000000..0929c342a78
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-71416-payments-settings-rtl
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Fix misplaced action buttons, arrows and the business location chevron on the Payments settings page in RTL languages.
diff --git a/plugins/woocommerce/client/admin/client/settings-payments/components/country-selector/country-selector.scss b/plugins/woocommerce/client/admin/client/settings-payments/components/country-selector/country-selector.scss
index 8f860cff8f9..e32e6679086 100644
--- a/plugins/woocommerce/client/admin/client/settings-payments/components/country-selector/country-selector.scss
+++ b/plugins/woocommerce/client/admin/client/settings-payments/components/country-selector/country-selector.scss
@@ -135,7 +135,6 @@
line-height: 1;
width: 100%;
border: none;
- padding-right: 40px;
position: relative;
color: $gray-600;
font-size: 13px;
@@ -177,19 +176,7 @@
}
}
-html[dir="rtl"] {
- .components-country-select-control__button svg {
- margin-left: 0;
- margin-right: auto;
- }
-
- .components-country-select-control__search--input-suffix {
- right: auto;
- left: 5px;
- }
-
- .components-country-select-control__search--input {
- padding-right: 8px;
- padding-left: 40px;
- }
+// Outranks WordPress core's input[type="text"] padding, so the clear button has room.
+.components-country-select-control__search .components-country-select-control__search--input {
+ padding-right: 40px;
}
diff --git a/plugins/woocommerce/client/admin/client/settings-payments/components/payment-gateway-list/payment-gateway-list.scss b/plugins/woocommerce/client/admin/client/settings-payments/components/payment-gateway-list/payment-gateway-list.scss
index f4a40a3ba4b..2fd47497ebb 100644
--- a/plugins/woocommerce/client/admin/client/settings-payments/components/payment-gateway-list/payment-gateway-list.scss
+++ b/plugins/woocommerce/client/admin/client/settings-payments/components/payment-gateway-list/payment-gateway-list.scss
@@ -210,52 +210,3 @@
}
}
}
-
-html[dir="rtl"] {
- .settings-payment-gateways__list {
- .woocommerce-list__item {
- &-before {
- margin-right: 0;
- margin-left: $gap;
-
- @media screen and ( max-width: $break-medium ) {
- margin-left: 0;
- }
- }
-
- &-text {
- margin-right: 0;
- margin-left: $gap;
-
- @media screen and ( max-width: $break-medium ) {
- margin-left: 0;
- }
- }
-
- &-buttons {
- margin-left: 0;
- margin-right: auto;
-
- @media screen and ( max-width: $break-medium ) {
- margin-right: 0;
- }
-
- &__actions {
- @media screen and ( min-width: $break-medium ) and ( max-width: $break-xlarge ) {
- justify-content: flex-start;
- }
- }
- }
-
- &-after {
- margin-left: 0;
- margin-right: $gap;
-
- &.no-buttons {
- margin-left: 0;
- margin-right: auto;
- }
- }
- }
- }
-}