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>

[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](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.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbs
 p;[![Share on X](https://img.shields.io/badge/X-share-black)](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).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](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) [![Ask Dosu about superset](https://img.shields.io/badge/Ask%20Dosu%20about%20superset-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDczLjExOTZaIiBmaWxsPSIjNzc4NTYxIi8%2BPHBhdGggZD0iTTE3LjQ5MTYgMy43MzYzM0wzLjU4NTU3IDEyLjcwO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ZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik0wLjM0ODYzMyA4NS40OTQ2QzAuMzQ4NjMzIDg1LjQ5NDYgMjkuNDg1NiA4NS44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](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) [![Share Dosu with your team](https://img.shields.io/badge/Share%20Dosu%20with%20your%20team-1f6feb?style=flat)](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).

[![Leave Feedback](https://img.shields.io/badge/Leave%20Feedback-555555?style=flat)](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) [![Learn about superset with Dosu](https://img.shields.io/badge/Learn%20about%20superset%20with%20Dosu-2f7b3f?style=flat&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODkiIHZpZXdCb3g9IjAgMCA4NiA4OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNS4yOTIzNiAxMi43OTI4TDE3Ljc1OTMgNi42ODE4OFY3Mi41NjY3TDUuMjkyMzYgODQuMDYxOFYxMi43OTI4WiIgZmlsbD0iI0I0QkI5MSIvPjxwYXRoIGQ9Ik0xOC4yNTc1IDczLjExOTZMNTkuMTMyOSA3Mi43NDhMNTEuNzAxMSA4Mi40MDk1TDI5LjAzMzggODYuMjkxTDYuMjM5NjIgODUuMTU1NEwxOC4yNTc1IDczLjExOTZaIiBmaWxsPSIjNzc4NTYxIi8%2BPHBhdGggZD0iTTE3LjQ5MTYgMy43MzYzM0wzLjU4NTU3IDEyLjcwOTlWODMuNTc5MkMzLjU4NTU3IDg0Ljc1NDIgNC4
 5ODU2MyA4NS4zNjUyIDUuODQ3MDUgODQuNTY2TDE5LjYyOTYgNzEuNzgwMSIgc3Ryb2tlPSJib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S44MzA5IDM0LjgwOSA4NS42OThDNDQuODMzNyA4NS40NDc3IDUxLjI4NzIgODQuNDAyIDU3LjUyNjkgNzguOTcyNEM2Mi44MTI5IDc0LjM3MjcgNzUuMTM0MiA1OS42ODM2IDc1LjEzNDIgNTkuNjgzNiIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSI2LjE2NDgyIi8%2BPC9zdmc%2B)](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) [![Add Dosu to your team](https://img.shields.io/badge/Add%20Dosu%20to%20your%20team-1f6feb?style=flat)](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>

[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](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.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](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