Commit a438ed96983 for woocommerce
commit a438ed969836392b17173a2a93f73aef477fcd3e
Author: Ann <annchichi@users.noreply.github.com>
Date: Tue Apr 28 16:40:03 2026 +0800
Adopt WP 7.0 form-control sizing on settings inputs and Select2 multi-select (#64322)
* Adopt WP 7.0 form-control sizing on settings and Select2 multi-select
WP 7.0 bumped native form-control min-height to 40px and horizontal
padding to 12px (up from 30px / 8px). Woo's .wc-wp-version-gte-70
override block already centres labels and resizes Select2 single
selects, but the text-input horizontal padding and Select2 multi-select
border-radius were missed — leaving settings inputs at 8px padding and
multi-selects at the pre-7.0 4px radius on WP 7.0 sites.
- Add padding: 0 12px to the standard text-input selector list inside
.wc-wp-version-gte-70 .woocommerce table.form-table.
- Add border-radius: 2px to the existing .select2-selection--multiple
rule in the same version block.
No change on WP < 7.0 (the gte-53 fallback rules are untouched).
* Extend WP 7.0 form-control alignment to shipping zone controls and Select2 single text
diff --git a/plugins/woocommerce/changelog/tweak-admin-form-controls-wp7-align b/plugins/woocommerce/changelog/tweak-admin-form-controls-wp7-align
new file mode 100644
index 00000000000..bcebad80bdc
--- /dev/null
+++ b/plugins/woocommerce/changelog/tweak-admin-form-controls-wp7-align
@@ -0,0 +1,4 @@
+Significance: patch
+Type: tweak
+
+Align settings page input padding, Select2 single/multi-select text padding and border-radius, and shipping zone name/regions controls with WordPress 7.0 native form-control sizing.
diff --git a/plugins/woocommerce/client/legacy/css/admin.scss b/plugins/woocommerce/client/legacy/css/admin.scss
index db37d6b2fa0..17415757897 100644
--- a/plugins/woocommerce/client/legacy/css/admin.scss
+++ b/plugins/woocommerce/client/legacy/css/admin.scss
@@ -8325,6 +8325,23 @@ table.bar_chart {
padding: 6px 8px;
}
+ // Adopt WP 7.0 12px horizontal padding on settings inputs.
+ .woocommerce table.form-table {
+ input[type="text"],
+ input[type="email"],
+ input[type="number"],
+ input[type="password"],
+ input[type="datetime-local"],
+ input[type="date"],
+ input[type="time"],
+ input[type="week"],
+ input[type="url"],
+ input[type="tel"],
+ input.regular-input {
+ padding: 0 12px;
+ }
+ }
+
// Colour picker swatch: match WP 7.0 input height (40px).
.woocommerce table.form-table .colorpickpreview {
height: 40px;
@@ -8341,6 +8358,7 @@ table.bar_chart {
.select2-selection__rendered {
line-height: 38px;
+ padding: 0 12px; // Match WP 7.0 native input padding so text aligns with sibling inputs.
}
.select2-selection__arrow {
@@ -8350,6 +8368,7 @@ table.bar_chart {
.select2-selection--multiple {
min-height: 40px;
+ border-radius: 2px; // Match WP 7.0 native select border-radius.
.select2-selection__rendered {
display: block;
@@ -8599,6 +8618,16 @@ table.bar_chart {
margin-left: 4px;
margin-right: 4px;
}
+
+ // Shipping zone name input: ID selector in the base rule outranks the form-table override above.
+ .wc-shipping-zone-settings #zone_name {
+ padding: 0 12px;
+ }
+
+ // Zone regions TreeSelectControl: match WP 7.0 native select border-radius.
+ #wc-shipping-zone-region-picker-root .woocommerce-tree-select-control .components-base-control {
+ border-radius: 2px;
+ }
}
/**