-
-
Notifications
You must be signed in to change notification settings - Fork 973
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
Add custom -bd-accent-color
css value
#1663
Conversation
Video Preview: accent.mov |
I understand why you prefixed it with :root {
--os-accent-color: <result of ipc>;
} rather than trying to manually process and replace every css added through the DOM manager as that adds additional overhead (and makes it unexpectedly asynchronous) and does not catch all cases. |
I've updated it to do that, the only issue is that there might be a noticeable delay before the colour "loads" as it's executing after the rest of the startup process however that would only be a problem if a theme used this value extensively. |
Yeah that's a fair point, and I don't have a problem with it being moved to before themes in the core order and done via IPC.getSystemAccentColor().then(value => DOMManager.injectStyle("bd-os-values", `:root {--os-accent-color: ${value})); Or is there something else that prevents us from doing it that early? I also thought about whether this should be a user setting, but I think making it a setting would end up with too much inconsistency. My only other thought is, what do you think about returning |
That could be done, but yes I do agree it would add a level of complexity. |
Yeah if you think it's not worth it then let's not bother. It LGTM otherwise. |
Actually I think there's a typo in the css being injected, is there no closing bracket for the |
Closes #970.
Adds a special
--os-accent-color
variable that themes/customcss can use.e.g.