Skip to content

Commit 62c14da

Browse files
authored
refactor: add pseudo-element to increase field button clickable area (#10454)
1 parent 707c30a commit 62c14da

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

packages/field-base/src/styles/button-base-styles.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ export const button = css`
1414
-webkit-tap-highlight-color: transparent;
1515
-webkit-user-select: none;
1616
user-select: none;
17+
/* Ensure minimum click target (WCAG) */
18+
padding: max(0px, (24px - 1lh) / 2);
19+
margin: min(0px, (24px - 1lh) / -2);
1720
}
1821
1922
/* Icon */

packages/text-area/src/styles/vaadin-text-area-base-styles.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ export const textAreaStyles = css`
2424
top: 0;
2525
}
2626
27+
[part~='clear-button'] {
28+
top: min(0px, (24px - 1lh) / -2);
29+
}
30+
2731
/* Workaround https://bugzilla.mozilla.org/show_bug.cgi?id=1739079 */
2832
:host([disabled]) ::slotted(textarea) {
2933
user-select: none;

0 commit comments

Comments
 (0)