-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Base color palette now uses hsl colors with a single `--dh-color-xxx-hue` variable defining each of the base colors (see not in testing section below) - Updated Monaco theme to consume --dh-color variables - Refined default dark theme a bit with more semantic variables mostly in support of Monaco. - Utils for normalizing colors + deriving css variables **Methodology for Resolving Css Variables and Normalizing Colors** ThemeUtils.resolveCssVariablesInRecord(record, targetEl) - Add tmp div to target element for resolving variables - Extract distinct `var` expressions from values in given record - For each distinct `var` expression, create a tmp css variable on the temp div - Call getComputedStyle() on the tmp div - For each value on the given record - Replace `var` expressions with resolved values. Values are resolved using `getPropertyValue()` on the result of `getComputedStyle()` in previous step. - Normalize any color values to 8 character hex - Convert to rgb/a - ColorUtils.asRgbOrRgbaString() - create a non-attached div element, set its background color then read the background color - Parse rgb/a and convert to hex with math **Testing** The MonacoTheme object now gets passed through a normalization function. You can see the before and after in the debug logs "Monaco theme:" and "Monaco theme derived:". The inputs are various `var(--dh-` expressions`, and the outputs should all be 8 character hex values. > Note: The new base color palette is hsl based derived from original hex colors Don created in his theming work. A mapping of the original hex to the new hsl version can be found here: > https://bmingles.github.io/deephaven-theming-spike/ > resolves #1542 BREAKING CHANGE: Theme variables have to be present on body to avoid Monaco init failing
- Loading branch information
Showing
21 changed files
with
1,279 additions
and
133 deletions.
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
Oops, something went wrong.