-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: themes #3
base: master
Are you sure you want to change the base?
feat: themes #3
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
It seems to work for me? Unless you have some uncommitted code. |
This comment was marked as outdated.
This comment was marked as outdated.
Getting an error and can't start up ACE without any theme in the local storage. |
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.
Really liking this so far, but I'm honestly not a fan of the manually defined class names in CSS. Can we look into using one of these solutions? The package tw-colors
looks really promising so maybe we can mess around with that?
@MikeRomaa For the first option, it will expand the color pallette quite a bit so it will take time to refactor since not only will all the class names need to change, and their invocations, but I will have to experiment with ranges of each theme color up between ranges (e.g. 100-300) This option will be limited in the fact that each theme MUST have the same amount of color variants for each field, or the error handling will spiral out of control (e.g. you can’t have FlyByWire go up to bg-bg-200 and amethyst go up to bg-bg-300) tw-colors seems to be more or less the same implementation here since everything is prefixed with theme, and you’d have to add additional wording to distinguish the background, text, padding, etc. I can try shortening the classnames a bit and changing secondary to accent. |
Closes #7
Adds support for global themes beyond light/dark modes, keeping the original theme as the default.
Philosophy:
Why not just use tailwind dark:
As of now tailwind doesn't support dynamic themes beyond light/dark mode. State-based styling adds much more flexibility and customization options.
### Why even use tailwind then with all this css?The CSS is condensed as much as possible, with the theme-specific dynamic styles being separated from tailwind concerns into style attributes.### Why are you passing the ThemeConfig into the redux state machine and not the UITheme?ThemeConfig is a simpler, serializable interface that can be passed to a UITheme on state changes. The existence of UITheme serves to make the items handled by the state alterable in the future (e.g. font style, size, etc.)
Theme values overview:
--primary : Primary color for highlighting text, elements, etc.
--secondary: Secondary highlight for visual contrast
--text: main text color
--padding: color for element padding/darker elements such as cards & buttons
--workspace-padding: lighter color than padding to account for extra layers in workspace
--background: main background color
Remaining issues:
Theme:'Default(dark)'
Theme: 'FlyByWire(dark)'
Theme: Atom-one-dark
Theme: Monokai