fix(theme): align input autofill with obsidian surfaces#117
Merged
Conversation
MUI hardcodes #266798 for :-webkit-autofill in dark mode. Override OutlinedInput and FilledInput input slot styles to use surface tokens and readable text/caret colors for both css vars and legacy paths. Co-authored-by: Max Kayander <mkayander@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Extract shared shadow/text/caret logic and MUI vars vs legacy branching into helpers. Narrow getColorSchemeSelector with an in-check (no cast). Co-authored-by: Max Kayander <mkayander@users.noreply.github.com>
Single-scheme dark themes get getColorSchemeSelector('dark') === '&',
which nested with &-webkit-autofill produced an invalid selector so MUI's
#266798 default still showed. Use flat &-webkit-autofill when mode is dark.
Co-authored-by: Max Kayander <mkayander@users.noreply.github.com>
OutlinedInput root uses transparent so fields sit on parent surface. Webkit autofill uses transparent 100px inset to drop MUI's blue fill. FilledInput root states forced transparent for consistency. Co-authored-by: Max Kayander <mkayander@users.noreply.github.com>
github-actions bot
pushed a commit
that referenced
this pull request
Apr 6, 2026
## [1.374.1](v1.374.0...v1.374.1) (2026-04-06) ### Bug Fixes * **theme:** align input autofill with obsidian surfaces ([#117](#117)) ([a072efd](a072efd)), closes [#266798](https://github.com/mkayander/dStruct/issues/266798) [#266798](https://github.com/mkayander/dStruct/issues/266798)
|
🎉 This PR is included in version 1.374.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Text fields showed an odd dark blue wash from MUI’s default
:-webkit-autofillhandling (#266798inset) and/or filled input backgrounds.Changes
MuiOutlinedInput:rootbackgroundColoristransparentso outlined fields show the parent surface; no separate input “panel” color.:-webkit-autofill: useWebkitBoxShadow: 0 0 0 100px transparent insetplustextPrimaryfor fill/caret (no color-matching logic, works regardless of selector quirks).MuiFilledInput: root background forced transparent across default, hover, focus, and disabled so filled variant also blends with the parent (if used).Testing
pnpm run tscpasses.eslint src/themes.tspasses.