Skip to content

Commit

Permalink
input: fixes ::autofill styles so that it does not break ::placeholde…
Browse files Browse the repository at this point in the history
…r text color (#375)

* input: fixes ::autofill styles so that it does not break ::placeholder text color

* bump patch version
  • Loading branch information
cody-dot-js authored Dec 11, 2024
1 parent 4b4d054 commit ca18d9f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions apps/www/app/routes/components.input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ export default function Page() {
<p>Username</p>
<Input placeholder="Enter a username" />
</Label>
<Label className="block w-full max-w-80 space-y-1">
<p>Email</p>
<Input placeholder="Enter your email" autoComplete="email" />
</Label>
<div className="w-full max-w-80 space-y-2">
<p>Validation States:</p>
<div className="flex w-full flex-col gap-6">
Expand Down
2 changes: 1 addition & 1 deletion packages/mantle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "mantle is ngrok's UI library and design system.",
"author": "ngrok",
"license": "MIT",
"version": "0.15.3",
"version": "0.15.4",
"homepage": "https://mantle.ngrok.com",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/mantle/src/components/input/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const InputContainer = ({
"data-validation-success:border-success-600 has-[:focus-visible]:data-validation-success:border-success-600 has-[:focus-visible]:data-validation-success:ring-focus-success",
"data-validation-warning:border-warning-600 has-[:focus-visible]:data-validation-warning:border-warning-600 has-[:focus-visible]:data-validation-warning:ring-focus-warning",
"data-validation-error:border-danger-600 has-[:focus-visible]:data-validation-error:border-danger-600 has-[:focus-visible]:data-validation-error:ring-focus-danger",
"[-webkit-text-fill-color:hsl(var(--text-strong))] autofill:shadow-[inset_0_0_0px_1000px_hsl(var(--blue-50))] has-[:autofill]:bg-blue-50", // Autofill styling on the input itself and any children with autofill styling
"autofill:shadow-[inset_0_0_0px_1000px_hsl(var(--blue-50))] has-[:autofill]:bg-blue-50 has-[:autofill]:[-webkit-text-fill-color:hsl(var(--text-strong))]", // Autofill styling on the input itself and any children with autofill styling
className,
)}
onClick={() => {
Expand Down

1 comment on commit ca18d9f

@vercel
Copy link

@vercel vercel bot commented on ca18d9f Dec 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.