You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "TraceMe365 (via GitHub)" <gi...@apache.org> on 2026/01/28 04:09:00 UTC
[D] Upgrading from version 5 to 6 has broken CSS updates [superset]
GitHub user TraceMe365 created a discussion: Upgrading from version 5 to 6 has broken CSS updates
After upgrading Apache Superset from version 5 to version 6, custom and application CSS changes have changed, including the classes of some cards. Is there a way to keep the CSS consistent.
[SupersetCSS.txt](https://github.com/user-attachments/files/24899650/SupersetCSS.txt)
GitHub link: https://github.com/apache/superset/discussions/37504
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Upgrading from version 5 to 6 has broken CSS updates [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Upgrading from version 5 to 6 has broken CSS updates
<!-- Answer -->
There isn’t a built-in way in Superset to add custom CSS just once and have it survive all future upgrades without ever needing to update selectors. Superset’s frontend uses dynamically generated class names (via Emotion and Ant Design), and major upgrades often change the DOM and class structure, which breaks CSS that targets those classes or elements. Even if you use persistent CSS templates or the dashboard CSS editor, you’ll still need to adapt your selectors after upgrades that change the DOM or class names [(source)](https://github.com/apache/superset/issues/32847).
To minimize breakage, use the most stable selectors available—like chart IDs, `data-test` attributes, or general container classes (e.g., `.dashboard-content`, `.grid-container`)—and avoid targeting generated class names [(source)](https://github.com/apache/superset/issues/36794). Superset is working toward more robust, token-based theming, but for now, updating selectors after major upgrades is unavoidable [(source)](https://github.com/apache/superset/issues/36842).
Best practice: document your customizations, use CSS templates for persistence, and plan to review selectors after each major upgrade.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/241a5789-1c5e-4da2-bc20-98962e256681?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/241a5789-1c5e-4da2-bc20-98962e256681?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/241a5789-1c5e-4da2-bc20-98962e256681?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/241a5789-1c5e-4da2-bc20-98962e256681?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/241a5789-1c5e-4da2-bc20-98962e256681?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/241a5789-1c5e-4da2-bc20-98962e256681?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/241a5789-1c5e-4da2-bc20-98962e256681?feedback_type=other)</sup>
[](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=There%20isn%E2%80%99t%20a%20built-in%20way%20in%20Superset%20to%20add%20custom%20CSS%20just%20once%20and%20have%20it%20survive%20all%20future%20upgrades%20without%20ever%20needing%20to%20update%20selectors.%20Superset%E2%80%99s%20frontend%20uses%20dynamically%20generated%20class%20names%20%28via%20Emotion%20and%20Ant%20Design%29%2C%20and%20major%20upgrades%20often%20change%20the%20DOM%20and%20class%20structure%2C%20which%20breaks%20CSS%20that%20targets%20those%20classes%20or%20elements.%20Even%20if%20you%20use%20persistent%20CSS%20templates%20or%20the%20dashboard%20CSS%20editor%2C%20you%E2%80%99ll%20still%20need%20to%20adapt%20your%20selectors%20after%20upgrades%20that%20change%20the%20DOM%20or%20class%20names%20%5B%28source%29%5D%28https%3A//github.c
om/apache/superset/issues/32847%29.%0A%0ATo%20minimize%20breakage%2C%20use%20the%20most%20stable%20selectors%20available%E2%80%94like%20chart%20IDs%2C%20%60data-test%60%20attributes%2C%20or%20general%20container%20classes%20%28e.g.%2C%20%60.dashboard-content%60%2C%20%60.grid-container%60%29%E2%80%94and%20avoid%20targeting%20generated%20class%20names%20%5B%28source%29%5D%28https%3A//github.com/apache/superset/issues/36794%29.%20Superset%20is%20working%20toward%20more%20robust%2C%20token-based%20theming%2C%20but%20for%20now%2C%20updating%20selectors%20after%20major%20upgrades%20is%20unavoidable%20%5B%28source%29%5D%28https%3A//github.com/apache/superset/issues/36842%29.%0A%0ABest%20practice%3A%20document%20your%20customizations%2C%20use%20CSS%20templates%20for%20persistence%2C%20and%20plan%20to%20review%20selectors%20after%20each%20major%20upgrade.) [](https://go.dosu.dev/discord-bot)&nbs
p;[](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/37504)
GitHub link: https://github.com/apache/superset/discussions/37504#discussioncomment-15624182
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Upgrading from version 5 to 6 has broken CSS updates [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Upgrading from version 5 to 6 has broken CSS updates
<!-- Answer -->
There isn’t a built-in way in Superset to add custom CSS just once and have it survive all future upgrades without ever needing to update selectors. Superset’s frontend uses dynamically generated class names (via Emotion and Ant Design), and major upgrades often change the DOM and class structure, which breaks CSS that targets those classes or elements. Even if you use persistent CSS templates or the dashboard CSS editor, you’ll still need to adapt your selectors after upgrades that change the DOM or class names [(source)](https://github.com/apache/superset/issues/32847).
To minimize breakage, use the most stable selectors available—like chart IDs, `data-test` attributes, or general container classes (e.g., `.dashboard-content`, `.grid-container`)—and avoid targeting generated class names [(source)](https://github.com/apache/superset/issues/36794). Superset is working toward more robust, token-based theming, but for now, updating selectors after major upgrades is unavoidable [(source)](https://github.com/apache/superset/issues/36842).
Best practice: document your customizations, use CSS templates for persistence, and plan to review selectors after each major upgrade.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=241a5789-1c5e-4da2-bc20-98962e256681) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/37504#discussioncomment-15624182
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Upgrading from version 5 to 6 has broken CSS updates [superset]
Posted by "TraceMe365 (via GitHub)" <gi...@apache.org>.
GitHub user TraceMe365 added a comment to the discussion: Upgrading from version 5 to 6 has broken CSS updates
Is there a one time way to add the CSS without changing the selectors in every update.
GitHub link: https://github.com/apache/superset/discussions/37504#discussioncomment-15624171
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Upgrading from version 5 to 6 has broken CSS updates [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on the discussion: Upgrading from version 5 to 6 has broken CSS updates
<!-- Greeting -->
Hi @TraceMe365! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team.
<!-- Answer -->
Superset v6 introduced a major frontend overhaul: it migrated to Ant Design v5, switched to Emotion for CSS-in-JS, and removed Bootstrap. This changed many CSS class names and the DOM structure, which is why your custom CSS overrides broke after upgrading [details](https://github.com/apache/superset/pull/31590) [wiki](https://github.com/apache/superset/wiki/Frontend-Style-Guidelines).
To keep your CSS consistent, you’ll need to update your custom CSS to match the new DOM and class names. The best practices are:
- Avoid targeting dynamically generated class names (like `.css-x36kch`), since these can change with every build. Instead, use stable selectors such as chart IDs (e.g., `#chart-id-123`), `data-test` attributes, or general chart/container classes [discussion](https://github.com/apache/superset/issues/32847).
- Use the dashboard CSS editor or CSS templates (the legacy CssTemplate feature is still supported and injected at render time) to manage your custom styles [code](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/css_templates/api.py#L48-L161).
- For Ant Design components (navigation, menus, buttons, etc.), you can use the theme config and global tokens, but dashboard and chart visuals still require CSS overrides [issue](https://github.com/apache/superset/issues/36878).
- If your CSS isn’t taking effect, check for specificity issues, CSS load order, and the use of `!important` (Superset’s own styles sometimes use it too) [discussion](https://github.com/apache/superset/issues/32847).
- For advanced theming, keep an eye on the Superset theming roadmap—per-component theming via tokens is planned but not fully available yet [issue](https://github.com/apache/superset/issues/36842).
For practical examples and selector strategies, see these guides:
- [Customizing Superset dashboards with CSS](https://preset.io/blog/customizing-superset-dashboards-with-css/)
- [Additional CSS tips and tricks](https://preset.io/blog/customizing-apache-superset-dashboards-with-css-additional-tips-and-tricks/)
After each upgrade, you’ll likely need to inspect the new DOM and adapt your selectors. Document your customizations and test them after upgrades to minimize breakage.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=a77973e7-4fbf-4ed6-afa9-14bbb50b3868) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/37504#discussioncomment-15624072
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Upgrading from version 5 to 6 has broken CSS updates [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] added a comment to the discussion: Upgrading from version 5 to 6 has broken CSS updates
<!-- Greeting -->
Hi @TraceMe365! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team.
<!-- Answer -->
Superset v6 introduced a major frontend overhaul: it migrated to Ant Design v5, switched to Emotion for CSS-in-JS, and removed Bootstrap. This changed many CSS class names and the DOM structure, which is why your custom CSS overrides broke after upgrading [details](https://github.com/apache/superset/pull/31590) [wiki](https://github.com/apache/superset/wiki/Frontend-Style-Guidelines).
To keep your CSS consistent, you’ll need to update your custom CSS to match the new DOM and class names. The best practices are:
- Avoid targeting dynamically generated class names (like `.css-x36kch`), since these can change with every build. Instead, use stable selectors such as chart IDs (e.g., `#chart-id-123`), `data-test` attributes, or general chart/container classes [discussion](https://github.com/apache/superset/issues/32847).
- Use the dashboard CSS editor or CSS templates (the legacy CssTemplate feature is still supported and injected at render time) to manage your custom styles [code](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/css_templates/api.py#L48-L161).
- For Ant Design components (navigation, menus, buttons, etc.), you can use the theme config and global tokens, but dashboard and chart visuals still require CSS overrides [issue](https://github.com/apache/superset/issues/36878).
- If your CSS isn’t taking effect, check for specificity issues, CSS load order, and the use of `!important` (Superset’s own styles sometimes use it too) [discussion](https://github.com/apache/superset/issues/32847).
- For advanced theming, keep an eye on the Superset theming roadmap—per-component theming via tokens is planned but not fully available yet [issue](https://github.com/apache/superset/issues/36842).
For practical examples and selector strategies, see these guides:
- [Customizing Superset dashboards with CSS](https://preset.io/blog/customizing-superset-dashboards-with-css/)
- [Additional CSS tips and tricks](https://preset.io/blog/customizing-apache-superset-dashboards-with-css-additional-tips-and-tricks/)
After each upgrade, you’ll likely need to inspect the new DOM and adapt your selectors. Document your customizations and test them after upgrades to minimize breakage.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/a77973e7-4fbf-4ed6-afa9-14bbb50b3868?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/a77973e7-4fbf-4ed6-afa9-14bbb50b3868?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/a77973e7-4fbf-4ed6-afa9-14bbb50b3868?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/a77973e7-4fbf-4ed6-afa9-14bbb50b3868?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a77973e7-4fbf-4ed6-afa9-14bbb50b3868?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/a77973e7-4fbf-4ed6-afa9-14bbb50b3868?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a77973e7-4fbf-4ed6-afa9-14bbb50b3868?feedback_type=other)</sup>
[](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github) [](https://cursor.com/link/prompt?text=Superset%20v6%20introduced%20a%20major%20frontend%20overhaul%3A%20it%20migrated%20to%20Ant%20Design%20v5%2C%20switched%20to%20Emotion%20for%20CSS-in-JS%2C%20and%20removed%20Bootstrap.%20This%20changed%20many%20CSS%20class%20names%20and%20the%20DOM%20structure%2C%20which%20is%20why%20your%20custom%20CSS%20overrides%20broke%20after%20upgrading%C2%A0%5Bdetails%5D%28https%3A//github.com/apache/superset/pull/31590%29%C2%A0%5Bwiki%5D%28https%3A//github.com/apache/superset/wiki/Frontend-Style-Guidelines%29.%0A%0ATo%20keep%20your%20CSS%20consistent%2C%20you%E2%80%99ll%20need%20to%20update%20your%20custom%20CSS%20to%20match%20the%20new%20DOM%20and%20class%20names.%20The%20best%20practices%20are%3A%0A%0A-%20Avoid%20targeting%20dynamically%20generated%20class%20
names%20%28like%20%60.css-x36kch%60%29%2C%20since%20these%20can%20change%20with%20every%20build.%20Instead%2C%20use%20stable%20selectors%20such%20as%20chart%20IDs%20%28e.g.%2C%20%60%23chart-id-123%60%29%2C%20%60data-test%60%20attributes%2C%20or%20general%20chart/container%20classes%C2%A0%5Bdiscussion%5D%28https%3A//github.com/apache/superset/issues/32847%29.%0A-%20Use%20the%20dashboard%20CSS%20editor%20or%20CSS%20templates%20%28the%20legacy%20CssTemplate%20feature%20is%20still%20supported%20and%20injected%20at%20render%20time%29%20to%20manage%20your%20custom%20styles%C2%A0%5Bcode%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/css_templates/api.py%23L48-L161%29.%0A-%20For%20Ant%20Design%20components%20%28navigation%2C%20menus%2C%20buttons%2C%20etc.%29%2C%20you%20can%20use%20the%20theme%20config%20and%20global%20tokens%2C%20but%20dashboard%20and%20chart%20visuals%20still%20require%20CSS%20overrides%C2%A0%5Bissue%5D%28https%3A//github.c
om/apache/superset/issues/36878%29.%0A-%20If%20your%20CSS%20isn%E2%80%99t%20taking%20effect%2C%20check%20for%20specificity%20issues%2C%20CSS%20load%20order%2C%20and%20the%20use%20of%20%60%21important%60%20%28Superset%E2%80%99s%20own%20styles%20sometimes%20use%20it%20too%29%C2%A0%5Bdiscussion%5D%28https%3A//github.com/apache/superset/issues/32847%29.%0A-%20For%20advanced%20theming%2C%20keep%20an%20eye%20on%20the%20Superset%20theming%20roadmap%E2%80%94per-component%20theming%20via%20tokens%20is%20planned%20but%20not%20fully%20available%20yet%C2%A0%5Bissue%5D%28https%3A//github.com/apache/superset/issues/36842%29.%0A%0AFor%20practical%20examples%20and%20selector%20strategies%2C%20see%20these%20guides%3A%0A-%20%5BCustomizing%20Superset%20dashboards%20with%20CSS%5D%28https%3A//preset.io/blog/customizing-superset-dashboards-with-css/%29%0A-%20%5BAdditional%20CSS%20tips%20and%20tricks%5D%28https%3A//preset.io/blog/customizing-apache-superset-dashboards-with-css-additional-tips-and-tricks/%
29%0A%0AAfter%20each%20upgrade%2C%20you%E2%80%99ll%20likely%20need%20to%20inspect%20the%20new%20DOM%20and%20adapt%20your%20selectors.%20Document%20your%20customizations%20and%20test%20them%20after%20upgrades%20to%20minimize%20breakage.) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/37504)
GitHub link: https://github.com/apache/superset/discussions/37504#discussioncomment-15624072
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] Upgrading from version 5 to 6 has broken CSS updates [superset]
Posted by "TraceMe365 (via GitHub)" <gi...@apache.org>.
GitHub user TraceMe365 closed a discussion: Upgrading from version 5 to 6 has broken CSS updates
After upgrading Apache Superset from version 5 to version 6, custom and application CSS changes have changed, including the classes of some cards. Is there a way to keep the CSS consistent.
[SupersetCSS.txt](https://github.com/user-attachments/files/24899650/SupersetCSS.txt)
GitHub link: https://github.com/apache/superset/discussions/37504
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org