-
-
Notifications
You must be signed in to change notification settings - Fork 533
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
DataGrid Header and Bootstrap 5 Dark Mode #5712
Comments
Have you tried defining the background color by using the Row Styling settings? I think we've added support for the Fixed Header to consider that background color. |
If we use RowStyling this only changes the background color of the DataGrid Rows, not te header. And it gets overruled by our theme settings so the RowStyling background color is only visible if i turn off our "Dark Mode BG" in the inspector. This picture shows the result we get when we make the background-color #fc8803 VIA RowStyling and turn our own background color off in the (chrome)inspector. |
Discussed in #5711
Originally posted by Alexander-JM-0224 August 22, 2024
Hello,
I am currently working on the UI of the web application of my employer, and i am supposed to implement a switchable Dark Theme.
Since we use Bootstrap 5 (5.3.3) i have used the JS script in the Bootstrap docs to make switching our Bootstrap theme possible and this works wich is very nice.
There is no other styling in our application (Blazor WASM .NET8) for the DataGrids, but the background colors do not all switch correctly and the inspector seems to indicate there is background-color coming from the Blazorise CSS.
Important note, i have already tried to give the DataGrids their own CSS class just for the background color. Even with !important it does nothing for me.
When i switch the color off in the inspector everything is perfect.
Problem DataGrid Header
![Header-pict](https://private-user-images.githubusercontent.com/171558415/360440704-239bf259-1659-4219-aeda-d0ab662c86f8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5Mjk5MjYsIm5iZiI6MTczODkyOTYyNiwicGF0aCI6Ii8xNzE1NTg0MTUvMzYwNDQwNzA0LTIzOWJmMjU5LTE2NTktNDIxOS1hZWRhLWQwYWI2NjJjODZmOC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1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U)
![Header-pict-dark](https://private-user-images.githubusercontent.com/171558415/360440800-7c44a37f-6348-4010-95db-9551af250188.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5Mjk5MjYsIm5iZiI6MTczODkyOTYyNiwicGF0aCI6Ii8xNzE1NTg0MTUvMzYwNDQwODAwLTdjNDRhMzdmLTYzNDgtNDAxMC05NWRiLTk1NTFhZjI1MDE4OC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwN1QxMjAwMjZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lZTM2YWZjY2ZjN2U2ZGI5MTljNmU0NDVjY2M5NWU2MzEzODJlMjRhOTJhZjdhZjE4ZWMyNmYyZjczZTRkMTIyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.HWWtxInJKgRgovXJOnlH-LSZ_cvUTcu5f468E8dPdhw)
![Column-pict](https://private-user-images.githubusercontent.com/171558415/360440837-0fa9dc46-ff83-41ed-bcb9-75b7bfb9c34c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5Mjk5MjYsIm5iZiI6MTczODkyOTYyNiwicGF0aCI6Ii8xNzE1NTg0MTUvMzYwNDQwODM3LTBmYTlkYzQ2LWZmODMtNDFlZC1iY2I5LTc1YjdiZmI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EwZWQzODdjM2Y2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.jBNkQYpoqPZ6niRAkBxO0AhRTR1qEb6EeqEkBUhGhQ8)
![Declaration](https://private-user-images.githubusercontent.com/171558415/360441584-e7523097-b549-4927-8d72-73aebd900cad.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5Mjk5MjYsIm5iZiI6MTczODkyOTYyNiwicGF0aCI6Ii8xNzE1NTg0MTUvMzYwNDQxNTg0LWU3NTIzMDk3LWI1NDktNDkyNy04ZDcyLTczYWViZDkwMGNhZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwN1QxMjAwMjZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03NDBiN2U2ZDU3ZWFiM2FlNGNiYmI5ZDRlNmU3MTk5ZjMzMTZkZmVkMWNjZTFlMWEyYTliM2ZiNGM4OGE1NTJjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.jsILO1-C00oPUYSP-rSP-azn-98W0UeaP5BFmdBhR_U)
Inspector
Result when Inspector turns background-color off
Same for a colum
And the inspector
This is how they declare the DataGrid i do not think the problem starts here but ill give it anyways.
Tested in Chrome and Firefox with Windows 11
What could be the cause of this issue? Are we doing something wrong? Do you need more information from me? Let me know!
Thanks in advance!
Alexander
The text was updated successfully, but these errors were encountered: