Skip to content

Conversation

@lukewarlow
Copy link
Contributor

@lukewarlow lukewarlow commented Feb 1, 2026

Dark Before:

image

Dark After:

image

Light Before:

image

Light After:

image

This is added to improve the contrast. It's still not great but a follow-up can change the actual border colour when in prefers-contrast: more, with this change that's at least some contrast.

@vercel
Copy link

vercel bot commented Feb 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 1, 2026 9:55pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 1, 2026 9:55pm
npmx-lunaria Ignored Ignored Feb 1, 2026 9:55pm

Request Review

@garthdw
Copy link
Contributor

garthdw commented Feb 1, 2026

image

Should active take into account accent color for border?

@trueberryless
Copy link
Contributor

I personally do not 100% agree with the design of the toggles with those outlines. Another idea to increase the contrast could be to change the background color of a inactive toggle to something lighter (in dark mode) and respectively darker (in light mode). IMO we should keep the little shadow, it creates a nice little effect. But that's just my humble opinion. Great catch! 🙌

@lukewarlow
Copy link
Contributor Author

Should active take into account accent color for border?

Good catch this should probably changed so that its border-transparent when checked.

@lukewarlow
Copy link
Contributor Author

Now the border is transparent when checked but shows when it's not. I suspect this was the intent of the original code.

image

@lukewarlow
Copy link
Contributor Author

lukewarlow commented Feb 1, 2026

IMO we should keep the little shadow, it creates a nice little effect. But that's just my humble opinion. Great catch!

I don't feel too strongly about this, I think it can look weird to have the border and shadow, but like above I've changed this so it's shadowed only when checked. I think that gives the best overall look.

image

@danielroe danielroe added this pull request to the merge queue Feb 1, 2026
Merged via the queue into npmx-dev:main with commit 6b9a6ae Feb 1, 2026
14 checks passed
@lukewarlow lukewarlow deleted the switch-border branch February 1, 2026 22:23
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.

4 participants