-
Notifications
You must be signed in to change notification settings - Fork 573
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
Bootstrap Dark-Mode (Black on Black colours) #6496
Comments
I checked, and this is also because my Browser is by default in dark mode. Overal the dark mode is workable, but requires a bit more care in my opinion. |
That's fine, what colour did u want for dark mode on graph? |
I will tag onto this then. I was thinking something like light-grey. A bit like how dark and light mode are often opposites of eachother. And just bright white seems too bright for a dark mode, especially when the point is to not burn your eyes out at night. |
find a colour and give us the hex haha |
Something like: #a6a6a6 |
in theory from my testing today, this is how its done with the 'dark' mode at the moment with bootstrap the is however another class call so it will take some time but at least its a start at rhe moment! |
Hi marclaporte and all, I'm not sure exactly what the status of the MeshCentral code is, regarding color modes, so I hope this comment is useful, as a little overview. We implemented Bootstrap color modes in Tiki 26, released in July 2023 (https://doc.tiki.org/Tiki26), and Bootstrap has been adding new CSS variables with each release, and the Tiki team has been enhancing the color modes functionality. Basically, there needs to be a declaration of the data-bs-theme attribute on the HTML tag to specify the color mode for the page (or can be just for a specific page element), and then element color properties are determined by CSS variables according to which data-bs-theme selector is active. A little JavaScript places the attribute on the HTML tag and implements the UI switch and recognizes the browser color theme preference when the switch is set to "auto". This can be seen in the Bootstrap color modes page source (https://getbootstrap.com/docs/5.3/customize/color-modes/). About specifying the colors of page elements, if the project uses SCSS compiling to produce the final stylesheets, there is a set of SCSS variables that are defined by the author for light and dark themes. This file - https://github.com/twbs/bootstrap/blob/main/scss/_variables-dark.scss - shows the dark versions, and the corresponding variables in _variables.scss define the light versions. When compiled, these create the sections in the final CSS file for the So, some page elements will "automatically" switch colors and have good contrast in both color modes because they are covered by the CSS variables that define their color in each mode, such as the body color and background color (as shown by lines 43 - 57 in the _variables-dark.scss file). Other page elements will likely need to have a new class or classes added in order to be responsive to color mode switching, to avoid things like the dark-on-dark text mentioned in this thread. Bootstrap provides some foreground and background color classes and CSS variables for that kind of situation (https://getbootstrap.com/docs/5.3/customize/color/). So adding the appropriate class (like https://getbootstrap.com/docs/5.3/customize/color/#using-the-new-colors) and maybe using the Bootstrap color values as defaults should give good results. I don't think we needed to redefine these colors when fixing some color contrast issues in Bootswatch themes in Tiki generally speaking; the Bootstrap values worked fine. -- Gary |
@gary-c-l this is exactually what we are in the process of doing :) |
Hello MeshCentral developers.
I want to make an inquiry if its wanted that the 7-Day power state should be dark color on dark color?
It is not terrible, but it could be improved. What is your opinion?
The text was updated successfully, but these errors were encountered: