refactor(css): modularize styles into common, dashboard, games and add purgecss (#433) - #606
Open
rishab11250 wants to merge 6 commits into
Open
refactor(css): modularize styles into common, dashboard, games and add purgecss (#433)#606rishab11250 wants to merge 6 commits into
rishab11250 wants to merge 6 commits into
Conversation
|
@rishab11250 is attempting to deploy a commit to the Aditya Mahajan's projects Team on Vercel. A member of the Team first needs to authorize it. |
Thank You for Your Contribution! 🎉Hi @rishab11250, Thank you for opening this Pull Request and contributing to our project. We truly appreciate your efforts.
The maintainer @Aditya8369 will review your PR shortly! Happy Contributing! 🚀 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Owner
|
@rishab11250 please fix deployment |
Fix three pre-existing issues that broke the production build and the Vercel deployment: - HealthAdvisory.jsx: fix mismatched JSX tags in the tips grid (opened div, closed with li/ul) that failed the esbuild transform - vite.config.js: raise the build target to es2022 so the DEV-only top-level await from @axe-core/react no longer fails transpilation - vite.config.js: raise workbox maximumFileSizeToCacheInBytes to 5 MiB so the service worker can precache the main bundle
rishab11250
force-pushed
the
refactor/css-modularization-433
branch
from
August 7, 2026 19:19
1e7b007 to
8c98b4d
Compare
Contributor
Author
|
Hi @Aditya8369 — the deployment is fixed. The Vercel build was failing due to three pre-existing issues on `main` (not from the CSS modularization itself), which I've now fixed and pushed to this PR: |
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.
Pull Request
Description
Modularizes the 198KB single-file
src/styles.cssinto three focused stylesheets and adds a PostCSS purge step so unused styles are stripped from the production bundle.The original file had grown to ~10,000 lines and contained a duplicated block appended to itself. This change splits it into
src/styles/common.css(tokens, themes, base, shell),src/styles/dashboard.css(dashboard layout, mobile, comparison), andsrc/styles/games.css(scenario simulator, AQI mission game), withsrc/styles.csskept as a thin@importaggregator so existing imports keep working.Related Issue
Closes #433
Type of Change
Changes Made
src/styles.cssintosrc/styles/common.css,src/styles/dashboard.css,src/styles/games.csssrc/styles.cssas an@importaggregator for backward compatibilitypostcss.config.jswith@fullhuman/postcss-purgecss, enabled for production buildsconfidence-${level},cols-${n}) so purge does not strip styles that are built from template literalsTesting
Screenshots
If applicable, attach screenshots or screen recordings.
Checklist
Additional Notes
Purgecss is production-only. Its safelist covers library classes (
leaflet-,recharts-,theme-) plus classes composed dynamically in JSX. The production build previously failed on upstreammaindue to a pre-existing top-level await transpile error unrelated to this change; CSS module and purge behavior were verified in isolation.