Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase form input field border contrast #356

Merged
merged 1 commit into from
May 3, 2024

Conversation

olivierlacan
Copy link
Contributor

@olivierlacan olivierlacan commented Apr 29, 2024

The contrast provided by the border-gray-200 Tailwind utility class is very poor. It's nearly impossible to distinguish the edges of an input field on a white background.

That's not a great default experience for Rails scaffolds.

With a slight bump to border-gray-400, things are much easier to distinguish.

Here's a simple example where I only changed the border class on the Name field at the top:

Safari:
image

Firefox:
image

Chrome:
image

With a stock Rails 7.1 app, I genuinely could not distinguish the edges of any input field until I made this change. I think the examples speak for themselves. I can understand the desire for subtlety but I think this change would be beneficial. I'm deliberately not address a similar issue with non-call-to-action buttons in this PR, in case there's disagreement.

The contrast provided by the border-gray-200 Tailwind utility
class is very poor. It's nearly impossible to distinguish the edges 
of an input field on a white background. 

That's not a great default experience for Rails scaffolds.

With a slight bump to border-gray-400, things are much easier 
to distinguish.
@javierjulio
Copy link

Looks better, thank you! I think this is a better default. For what it's worth, it matches what Tailwind uses in their Forms examples.

@flavorjones flavorjones requested a review from dhh May 1, 2024 13:40
@flavorjones flavorjones merged commit fe75869 into rails:main May 3, 2024
25 checks passed
@olivierlacan olivierlacan deleted the patch-1 branch May 5, 2024 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants