-
Notifications
You must be signed in to change notification settings - Fork 32
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
fix: Theming - switched from ?inline to ?raw css imports #1600
Merged
bmingles
merged 6 commits into
deephaven:main
from
bmingles:1599-fix-theming-inline-css
Oct 27, 2023
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
add15f1
Switched from inline to raw
bmingles a2aec75
Minify theming css in build
bmingles 884ed45
Added try / catch to MonacoUtils
bmingles 227ffa2
Fixed styleguide
bmingles d478cac
Fixed babel preset
bmingles 153cee8
Explicit build steps
bmingles File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,42 @@ | ||
import themeLightPalette from './theme-light-palette.css?inline'; | ||
import themeLightPalette from './theme-light-palette.css?raw'; | ||
|
||
/** | ||
* DH theme variables are imported via Vite `?raw` query which provides the | ||
* text content of the variable files as a string. The exported theme is just a | ||
* concatenation of the contents of all of these imports. | ||
* | ||
* Note that ?raw / ?inline imports are natively supported by Vite, but consumers | ||
* of @deephaven/components using Webpack will need to add a rule to their module | ||
* config. | ||
* e.g. | ||
* module: { | ||
* rules: [ | ||
* { | ||
* resourceQuery: /inline/, | ||
* type: 'asset/source', | ||
* }, | ||
* ], | ||
* } | ||
* | ||
* e.g. | ||
* | ||
* :root { | ||
* --dh-color-from-light-palette: #fff; | ||
* --dh-color-from-light-palette2: #ccc; | ||
* } | ||
* :root { | ||
* --dh-color-from-light-semantic: #000; | ||
* } | ||
* :root { | ||
* --dh-color-from-light-semantic-editor: #000; | ||
* } | ||
* :root { | ||
* --dh-color-from-light-semantic-grid: #000; | ||
* } | ||
* :root { | ||
* --dh-color-from-light-components: #000; | ||
* } | ||
*/ | ||
export const themeLight = themeLightPalette; | ||
|
||
export default themeLight; |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure where this example came from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just an example of concatenation of themes (modified from the comment in the dark one). Once light theme is actually implemented there will be multiple imports