GitHub user dosubot[bot] added a comment to the discussion: Styling Secondary Buttons using Ant Design Tokens
<!-- Answer --> Superset currently only supports a limited set of global Ant Design tokens for theming, and does not recognize per-component overrides like the `components.Button` tokens you tried. This means you can't directly set the background or text color of secondary buttons or tags via tokens in the theme config—these components inherit their styles from global tokens such as `colorPrimary`, `colorBgContainer`, and `colorTextSecondary` [see details](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/packages/superset-ui-core/src/theme/types.ts). Your JSON config had no effect because Superset ignores the `components` key and only applies tokens listed in its allowed set. As a result, more granular control (like targeting just secondary buttons or tags) isn't possible through tokens alone in current versions [reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/packages/superset-ui-core/src/theme/Theme.tsx). For now, the best workaround is to use targeted CSS overrides or extend Ant Design components with Emotion/styled components if you need precise control [styling best practices](https://github.com/apache/superset/wiki/Emotion-Styling-Guidelines-and-Best-Practices). Full support for per-component theming via tokens is expected in Superset 6.0 and later, so keep an eye on future releases for improved theming capabilities [theming roadmap](https://github.com/apache/superset/issues/34503). <!-- 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/4d4eb05b-686a-4947-991e-e13fc64e97d2?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/4d4eb05b-686a-4947-991e-e13fc64e97d2?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/4d4eb05b-686a-4947-991e-e13fc64e97d2?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/4d4eb05b-686a-4947-991e-e13fc64e97d2?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/4d4eb05b-686a-4947-991e-e13fc64e97d2?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/4d4eb05b-686a-4947-991e-e13fc64e97d2?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/4d4eb05b-686a-4947-991e-e13fc64e97d2?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)& nbsp;[](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/34574) GitHub link: https://github.com/apache/superset/discussions/34574#discussioncomment-14018326 ---- 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]
