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

Sort theme variables in a more intentional order #14952

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

adamwathan
Copy link
Member

This PR updates our default theme.css file and organizes the CSS variables in a custom order that's optimized for looking nice in Chrome dev tools.

You can only see ~50 variables "above the fold" in dev tools without clicking "Show all", so I've opted for putting variables near the top that have the highest "impact" on the design/brand of the site, and also showcase some of the modern CSS features we are using in Tailwind CSS v4.

Here's what it looks like:

image

I really want to show off the color palette because the swatches look nice and because seeing oklch there feels like a nice signal for Tailwind CSS v4 being very modern, but we have a lot of colors so you can't really fit much else if you do this. I stuck font families at the top since it's one of the few things that we can fit there that also feels important to your site's brand but still has few enough values not to push away the color palette.

@adamwathan adamwathan requested a review from a team as a code owner November 11, 2024 14:52
@adamwathan adamwathan merged commit 3244da8 into next Nov 11, 2024
1 check passed
@adamwathan adamwathan deleted the change/polish-theme-variable-order branch November 11, 2024 15:08
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.

2 participants