Remove remaining global styles ahead of Vite 8 upgrade#2006
Merged
Conversation
axelboc
commented
Apr 9, 2026
| | `--h5w-tooltip-guide--color` | `gray` | Color of tooltip guide | | ||
| | `--h5w-tooltip-guide--width` | `1.5` | Width of tooltip guide | | ||
| | `--h5w-tooltip-guide--opacity` | `0.5` | Opacity of tooltip guide | | ||
| | `--h5w-info--color` | `royalblue` | Color of information messages (e.g. "Too big to display" in _Scalar_ vis) | |
Contributor
Author
There was a problem hiding this comment.
Adding this --h5w-info--color CSS variable for Scalar vis, as it's now in located in the library but was still using the --secondary-dark variable.
Contributor
Author
There was a problem hiding this comment.
Renamed from styles.ts for clarity. I've reworded the comment too.
| }, | ||
| "scripts": { | ||
| "build": "vite build && pnpm \"/^build:/\"", | ||
| "build:css": "vite build --config vite.styles.config.js && concat dist/temp/styles.css dist/app.css -o dist/styles.css && rimraf dist/app.css dist/temp", |
Contributor
Author
There was a problem hiding this comment.
I'm changing the output directory of vite.styles.config.js to dist-css to avoid having to delete it at the end.
| formats: ['es'], | ||
| fileName: 'index', | ||
| cssFileName: 'lib', | ||
| cssFileName: 'styles', |
Contributor
Author
There was a problem hiding this comment.
This is now the filename referenced directly in package.json. No extra steps 🎉
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.
I hit a style ordering issue again with the shared global styles when upgrading to Vite 8. I think it's because the CSS pipeline now uses Lightning CSS instead of esbuild.
So I'm getting rid of those global styles once and for all.
With
react-reflexreplaced withreact-resizable-panelsin #1987, we had very few global styles left (just.btnClean,.fallbackand a couple of others), so it was just a matter of moving/duplicating the styles in the relevant packages.It's just a few duplicated lines but it allows us to remove a whole lot of complexity, notably the whole
build:csspipeline in@h5web/liband theglobal-styles.cssfiles. We still needbuild:cssin@h5web/appto output a single CSS file for consumers to import, but that's pretty much it.