fix(admin): match bulk action select and apply button sizes
- Add shared .aksrt-native-bulk row that locks select and button to the same height, font size and line height - Apply it to the charge cards and invite codes bulk action rows Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4f6e17ba5e
commit
1273a0138e
3 files changed
+18
-2
No files matched your search
@@ -365,6 +365,22 @@ a.aksrt-native-stat:focus { outline: 2px solid color-mix(in srgb, var(--an-tone)
|
||||
.aksrt-native .button .dashicons { width: 16px; height: 16px; margin: 0 4px 0 -2px; font-size: 16px; line-height: inherit; vertical-align: -1px; }
|
||||
.aksrt-native .submit { margin: 0; padding: 0; }
|
||||
|
||||
/* 批量操作行:下拉与「应用」按钮锁定同一高度与字号。
|
||||
WP 核心给 select 14px/line-height:2、给 .button 13px,且 782px 以下再把两者各自放大,
|
||||
只设 min-height 时两者会因字号、行高和基线对齐不同而错位,这里显式给定。 */
|
||||
.aksrt-native-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
||||
.aksrt-native-bulk select,
|
||||
.aksrt-native-bulk .button {
|
||||
box-sizing: border-box;
|
||||
height: 32px;
|
||||
min-height: 32px;
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
line-height: 30px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.aksrt-native-bulk select { width: auto; max-width: 12.5rem; }
|
||||
|
||||
/* ---------- 表格 ---------- */
|
||||
.aksrt-native-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
|
||||
.aksrt-native .widefat,
|
||||
|
||||
@@ -187,7 +187,7 @@ trait PayChargeCardsList {
|
||||
|
||||
echo '<form class="aksrt-cardpass-list-form" method="post">';
|
||||
wp_nonce_field(self::NONCE);
|
||||
echo '<div class="bulkactions aksrt-cardpass-bulk">
|
||||
echo '<div class="bulkactions aksrt-native-bulk aksrt-cardpass-bulk">
|
||||
<label for="bulk-action-selector-top" class="screen-reader-text">' . esc_html__('选择批量操作', 'aksrt') . '</label><select name="action" id="bulk-action-selector-top">
|
||||
<option value="-1">' . esc_html__('批量操作', 'aksrt') . '</option>
|
||||
<option value="delete">' . esc_html__('删除', 'aksrt') . '</option>
|
||||
|
||||
@@ -108,7 +108,7 @@ trait UsersMenusInviteCode {
|
||||
echo '<form method="post" action="' . esc_url(admin_url('admin-post.php')) . '" data-aksrt-inv-list'
|
||||
. ' data-confirm="' . esc_attr__('确定删除选中的 %d 个邀请码及其使用记录?此操作不可撤销。', 'aksrt') . '">';
|
||||
echo '<input type="hidden" name="action" value="aksrt_invite_delete"><input type="hidden" name="aksrt_nonce" value="' . esc_attr($nonce) . '">';
|
||||
echo '<div class="aksrt-inv-bulk"><span class="aksrt-inv-selection" data-aksrt-inv-selection data-label="' . esc_attr__('已选 %d 项', 'aksrt') . '" aria-live="polite"></span>'
|
||||
echo '<div class="aksrt-native-bulk aksrt-inv-bulk"><span class="aksrt-inv-selection" data-aksrt-inv-selection data-label="' . esc_attr__('已选 %d 项', 'aksrt') . '" aria-live="polite"></span>'
|
||||
. '<label class="screen-reader-text" for="bulk-action-selector-top">' . esc_html__('批量操作', 'aksrt') . '</label>'
|
||||
. '<select name="bulk_action" id="bulk-action-selector-top"><option value="-1">' . esc_html__('批量操作', 'aksrt') . '</option><option value="delete">' . esc_html__('删除', 'aksrt') . '</option></select>'
|
||||
. '<button type="submit" class="button" data-aksrt-inv-bulk disabled>' . esc_html__('应用', 'aksrt') . '</button></div>';
|
||||
|
||||
Reference in new issue
Block a user