Center the dropdown icon added to an input with a paired datalist in Chrome#18511
Merged
thecrypticace merged 9 commits intomainfrom Jul 15, 2025
Merged
Center the dropdown icon added to an input with a paired datalist in Chrome#18511thecrypticace merged 9 commits intomainfrom
thecrypticace merged 9 commits intomainfrom
Conversation
::marker added to an input with a paired datalist
reinink
reviewed
Jul 14, 2025
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.
8947ad2 to
b37e12d
Compare
::marker added to an input with a paired datalist
reinink
reviewed
Jul 15, 2025
Co-authored-by: Jonathan Reinink <jonathan@reinink.ca>
reinink
approved these changes
Jul 15, 2025
there’s a bug in nitro
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.
This PR tweaks the dropdown arrow added to an input by Chrome when it has a
listattribute pointing to a<datalist>.Right now the arrow isn't centered vertically:
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-itemdisplay.After this PR changes the line height its centered again:
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