GitHub user VasilijeBursac created a discussion: Is it possible to detect the currently active theme/theme algorithm (light/dark) from custom/external CSS in Apache Superset?
Hello everyone, In Apache Superset we have the ability to define themes, which allow us to style the UI at a more general level, and also custom/external CSS, which gives us more granular control and enables more precise styling for specific UI elements that cannot be covered by themes alone. **My question is whether there is any way, from custom external CSS, to detect which theme (or theme algorithm) is currently active, so that we could apply conditional styling based on that?** I see practical use cases for this, especially when working with light (default) and dark themes. In some cases, custom CSS rules that look correct in the light theme may cause color conflicts or visual issues in the dark theme. Ideally, we would like to define separate CSS rules depending on whether the active theme is light or dark. So my questions are: - Does Superset currently expose any CSS hooks, variables, attributes, or class names that indicate the active theme and can be used for conditional styling? - If not, is this something that is planned or being considered for future versions of Superset? Any guidance, best practices, or workarounds would be greatly appreciated. Thanks in advance! @mistercrunch @rusackas @msyavuz GitHub link: https://github.com/apache/superset/discussions/37035 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
