Skip to content

Commit 846e13b

Browse files
RivianTrackrclaude
andcommitted
Fix: AI model select text still clipping — specificity bump
My .rtg-ai-model-select class (0,1,0) was losing to the generic .rtg-wrap select rule (0,1,1) which already ships working padding, font-size, and line-height for every other select in the admin. My attempts to re-specify padding/line-height were either ignored due to specificity, or applied only partially and caused the glyph clip. Fix: pair the class with the element selector to win on specificity (.rtg-wrap select.rtg-ai-model-select, 0,1,2) and ONLY override what this row actually needs — width-related properties. Let the base .rtg-wrap select rule handle all text rendering, which works correctly everywhere else. Refresh button padding bumped to 10px to match the taller WP-styled select. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8623b93 commit 846e13b

2 files changed

Lines changed: 11 additions & 16 deletions

File tree

admin/css/admin-styles.css

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,29 +1400,24 @@
14001400
gap: 10px;
14011401
margin-top: 4px;
14021402
}
1403-
.rtg-ai-model-select {
1403+
/* Override the generic `.rtg-wrap select` rule above (specificity 0,1,1)
1404+
by pairing the class with the element selector (0,1,2). Don't try to
1405+
re-do the padding/line-height — the generic rule already renders fine
1406+
on every other select in the admin. We only need to widen it. */
1407+
.rtg-wrap select.rtg-ai-model-select {
14041408
min-width: 320px;
14051409
max-width: 100%;
1406-
/* Let the browser compute height from font + padding so text centers
1407-
reliably across Chrome / Safari / Firefox. Fixed `height` + `line-height`
1408-
on a <select> clips the glyph descenders on some platforms. */
1409-
padding: 8px 10px;
1410-
font-size: 14px;
1411-
line-height: 1.4;
1412-
border: 1px solid var(--rtg-border);
1413-
border-radius: 6px;
1414-
background-color: var(--rtg-bg-input, #fff);
1415-
color: var(--rtg-text-primary);
1410+
width: auto;
14161411
}
1417-
/* Match the refresh button's visual height to the naturally-sized select
1418-
(~36px at 14px / 1.4 with 8px top+bottom padding). */
1412+
/* Match the refresh button's visual rhythm to the WP admin select
1413+
(padding: 10px 12px, font-size: 15px, line-height: default). */
14191414
.rtg-ai-model-refresh-btn.button {
14201415
display: inline-flex;
14211416
align-items: center;
14221417
gap: 6px;
1423-
padding: 8px 14px;
1424-
line-height: 1.4;
1418+
padding: 10px 14px;
14251419
font-size: 14px;
1420+
height: auto;
14261421
}
14271422
.rtg-ai-model-refresh-btn .dashicons {
14281423
width: 16px;

0 commit comments

Comments
 (0)