Skip to content

Commit 8921dc4

Browse files
authored
fix(theme): safari autofill styling for dark mode readability in Input component (#5909)
* fix: add Safari autofill styling for dark mode readability in NumberInput & Input components * chore: add changeset for Safari autofill dark mode fix in NumberInput & Input components
1 parent fd9dd2a commit 8921dc4

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

.changeset/eleven-taxis-camp.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@heroui/theme": patch
3+
---
4+
5+
fix Safari autofill styling for dark mode readability in NumberInput & Input components (#4657)

packages/core/theme/src/components/input.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ const input = tv({
4848
"data-[type=color]:rounded-none",
4949
"file:cursor-pointer file:bg-transparent file:border-0",
5050
"autofill:bg-transparent bg-clip-text",
51+
// Safari autofill styling fix - ensures text color is visible in dark mode
52+
"dark:autofill:[-webkit-text-fill-color:hsl(var(--heroui-foreground))]",
5153
],
5254
clearButton: [
5355
"p-2",

packages/core/theme/src/components/number-input.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ const numberInput = tv({
4646
"data-[has-start-content=true]:ps-1.5",
4747
"data-[has-end-content=true]:pe-1.5",
4848
"autofill:bg-transparent bg-clip-text",
49+
// Safari autofill styling fix - ensures text color is visible in dark mode
50+
"dark:autofill:[-webkit-text-fill-color:hsl(var(--heroui-foreground))]",
4951
],
5052
clearButton: [
5153
"p-2",

0 commit comments

Comments
 (0)