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

Finalize 2.0 config file #2630

merged 6 commits into from Oct 21, 2020

Finalize 2.0 config file #2630

merged 6 commits into from Oct 21, 2020


Copy link

This PR finalizes the new config defaults for 2.0. It includes the following changes:

  • The fractional 16th values have been removed from the spacing scale and grid
  • All fractional sizes have been removed from the shared spacing scale
  • Individual utilities now have fractional sizes where appropriate, and only curated values I think are useful defaults
  • group-hover has been enabled by default for color-related utilities
  • focus has been enabled by default for z-index

The spacing related changes are in service of reducing the compiled file size. Even though PurgeCSS makes things tiny in production, we still have to be careful in development to avoid performance issues in browser dev tools. My original super generous attempt at the new default config file resulted in a 10mb CSS file, which I knew was huge, but was curious to see how browsers actually handled it. It caused noticeable slow downs in dev tools when trying to pull up the styles in the inspector panel. ~5mb seemed to be about the limit before things started getting sort of annoying.

With this config file (plus disabling dark mode by default which is coming in the next PR), the default build is 3.04mb which to me is fine.

None of this is a breaking change as it's only changing some things from previously experimental features. I would bet that these changes don't even affect the people who had the experiments enabled either, because the curation I did left everything that was actually useful in tact. In practice no one will even notice what is missing (hello -space-x-13/16).

@adamwathan adamwathan merged commit fc5c9ce into master Oct 21, 2020
@adamwathan adamwathan deleted the final-new-config branch October 21, 2020 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant