Skip to content

[docs][textfield] Document the autofill box-shadow theme token - #49607

Open
Seybel wants to merge 2 commits into
mui:masterfrom
Seybel:docs/textfield-autofill-token
Open

Seybel wants to merge 2 commits into
mui:masterfrom
Seybel:docs/textfield-autofill-token

Conversation

@Seybel

@Seybel Seybel commented Oct 29, 2026

Copy link
Copy Markdown

#47472 added a palette.Input.autofillWebkitBoxShadow token so the autofill background on outlined and filled inputs can follow the theme, but the docs don't mention it anywhere, so right now the only way to find it is reading the source.

This adds a short "Autofill styles" section to the Text Field customization docs:

  • what the token does, and its defaults in the light and dark color schemes
  • that it's only applied when CSS theme variables are enabled (without them, palette.Input is ignored and dark mode keeps the hardcoded #266798)
  • an example that sets it for both color schemes
  • a note that the token doesn't change the text and caret color, which stay white in dark mode

I checked the generated CSS variables and :-webkit-autofill rules with a quick local test, with and without cssVariables, and type-checked the example.

Refs #44665, #47472

@code-infra-dashboard

code-infra-dashboard Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Deploy preview

Bundle size

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Performance

No regressions in 32 benchmarks · ran 3m 11s · details


Check out the code infra dashboard for more information about this PR.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant