tailwindcss/packages/@tailwindcss-postcss/src
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
..
__snapshots__ Center the dropdown icon added to an input with a paired datalist in Chrome (#18511) 2025-07-15 14:41:04 -04:00
fixtures/example-project PostCSS: Fix Turbopack 'one-revision-behind' bug (#17554) 2025-04-04 14:58:50 +02:00
postcss-fix-relative-paths Postcss: Run plugin in Once hook (#15273) 2024-12-03 10:28:51 +01:00
ast.test.ts Use AST transformations in @tailwindcss/postcss (#15297) 2024-12-04 15:43:59 +01:00
ast.ts Fix PostCSS crash when using toJSON() (#18083) 2025-05-19 11:28:09 -04:00
index.cts Postcss: Bring back proper type exports (#14256) 2024-08-26 15:54:07 +02:00
index.test.ts PostCSS: Fix Turbopack 'one-revision-behind' bug (#17554) 2025-04-04 14:58:50 +02:00
index.ts Add support for source maps (#17775) 2025-05-08 16:29:49 -04:00