Skip to content

Commit

Permalink
fix(core/input): update autofill styling (#1237)
Browse files Browse the repository at this point in the history
  • Loading branch information
nuke-ellington committed Apr 24, 2024
1 parent 5fba894 commit 7072524
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/tiny-ads-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@siemens/ix': patch
---

fix(core/input): update autofill styling
19 changes: 11 additions & 8 deletions packages/core/scss/components/form/_input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
@import 'mixins/fonts';

@mixin element-input($feature-read-only: true) {
&,
&:-webkit-autofill {
& {
@include typography-body;
min-height: 2rem;
width: 100%;
Expand All @@ -25,10 +24,14 @@
box-shadow: var(--theme-input--box-shadow);
}

&:-webkit-autofill {
-webkit-box-shadow: 0 0 0 1000px var(--theme-input--background) inset !important;
-webkit-text-fill-color: var(--theme-input--color) !important;
border-color: var(--theme-input--border-color) !important;
&:-webkit-autofill,
&:autofill {
-webkit-box-shadow: 0 0 0 1000px var(--theme-color-component-info) inset !important;
-webkit-text-fill-color: var(--theme-input--color--autofill) !important;
background-color: var(--theme-input--background--autofill) !important;
border: var(--theme-input--border-thickness, 1px) solid
var(--theme-input--border-color--autofill) !important;
color: var(--theme-input--color--autofill) !important;
}

&::placeholder {
Expand All @@ -37,15 +40,15 @@

&.hover,
&:hover {
border-color: var(--theme-input--border-color--hover);
border-color: var(--theme-input--border-color--hover) !important;
background-color: var(--theme-input--background--hover);
}

&.focus,
&:focus {
outline: 1px solid var(--theme-color-focus-bdr);
outline-offset: var(--theme-input--focus--outline-offset);
border-color: var(--theme-input--border-color--focus);
border-color: var(--theme-input--border-color--focus) !important;
}

@if $feature-read-only == true {
Expand Down

0 comments on commit 7072524

Please sign in to comment.