tailwindcss/integrations
Jordan Pittman 88b9f15b65
Center the dropdown icon added to an input with a paired datalist in Chrome (#18511)
This PR tweaks the dropdown arrow added to an input by Chrome when it
has a `list` attribute pointing to a `<datalist>`.

Right now the arrow isn't centered vertically:

<img width="227" height="58" alt="Screenshot 2025-07-14 at 15 41 50"
src="https://github.com/user-attachments/assets/b354a5e8-432d-432d-bfe4-f7b6f6683548"
/>

The cause of this is the line height being inherited into the pseudo
element which controls how the marker is positioned. I *think* this is
because it's being drawn with unicode symbols but I'm not sure. It could
just be from the `list-item` display.

After this PR changes the line height its centered again:

<img width="227" height="58" alt="Screenshot 2025-07-14 at 15 42 05"
src="https://github.com/user-attachments/assets/1afa1f33-cc28-4b1f-9e04-e546f6848f57"
/>

Some notes:

This only affects Chrome and also does not appear to cause issues for
date/time inputs. While weird that this pseudo is the one used for a
`<datalist>` marker it is indeed correct.

Fixes #18499

Can use this Play to test the change:
https://play.tailwindcss.com/jzT35CRpr0

---------

Co-authored-by: Jonathan Reinink <jonathan@reinink.ca>
2025-07-15 14:41:04 -04:00
..
cli Center the dropdown icon added to an input with a paired datalist in Chrome (#18511) 2025-07-15 14:41:04 -04:00
oxide Small Typo Fixes and Comment Improvements (#18328) 2025-06-17 10:46:08 -04:00
postcss Fix source map paths in CI (#17938) 2025-05-08 22:56:49 +02:00
upgrade Improve @tailwindcss/upgrade and pnpm workspaces support (#18065) 2025-05-19 12:47:08 +02:00
vite Center the dropdown icon added to an input with a paired datalist in Chrome (#18511) 2025-07-15 14:41:04 -04:00
webpack Fix slow incremental builds (especially on Windows) (#17511) 2025-04-03 17:13:15 +02:00
package.json Update dedent 1.5.3 → 1.6.0 (minor) (#17965) 2025-05-10 13:21:48 +02:00
utils.ts Download platform specific package if optionalDependencies are skipped (#17929) 2025-05-09 14:55:02 +02:00
vitest.config.ts Improve integration tests (stability + performance) (#15125) 2024-12-12 13:48:56 +01:00