Keep browser autofill within canonical field colors
This commit is contained in:
@@ -350,6 +350,20 @@
|
||||
box-shadow: var(--nodedc-glass-control-shadow), inset 0 0 0 1px rgb(var(--nodedc-accent-rgb) / 0.22);
|
||||
}
|
||||
|
||||
/* Browsers enforce their autofill background with an internal !important rule.
|
||||
Paint the canonical field material above it; keep text, caret and keyboard
|
||||
focus in the same theme as manually entered values. */
|
||||
.nodedc-field__control:is(:autofill, :-webkit-autofill) {
|
||||
-webkit-text-fill-color: var(--nodedc-text-primary);
|
||||
caret-color: var(--nodedc-text-primary);
|
||||
box-shadow: inset 0 0 0 100vmax var(--nodedc-field-bg);
|
||||
}
|
||||
|
||||
.nodedc-field__control:is(:autofill, :-webkit-autofill):focus-visible {
|
||||
box-shadow: inset 0 0 0 1px rgb(var(--nodedc-accent-rgb) / 0.22),
|
||||
inset 0 0 0 100vmax var(--nodedc-field-bg);
|
||||
}
|
||||
|
||||
textarea.nodedc-field__control {
|
||||
min-height: 6rem;
|
||||
padding-block: 0.85rem;
|
||||
|
||||
Reference in New Issue
Block a user