Inconsistent Text Color Theme Fallback category Functionality

Tell me more ###### What is the issue? The colorTextSecondary fallback to colorText may result in inconsistent text color behavior when themes are changed. ###### Why this matters If colorTextSecondary is undefined in some themes but defined in others, the text color will switch between two different color variables, potentially causing unexpected visual changes. ###### Suggested change āˆ™ *Feature Preview* Use only one theme color variable to ensure consistent behavior across themes:
color: ${theme.colorText};
###### Provide feedback to improve future suggestions [![Nice Catch](https://img.shields.io/badge/šŸ‘%20Nice%20Catch-71BC78)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/1b42eaa5-3d9c-416f-bbba-918d78905560/upvote) [![Incorrect](https://img.shields.io/badge/šŸ‘Ž%20Incorrect-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/1b42eaa5-3d9c-416f-bbba-918d78905560?what_not_true=true) [![Not in Scope](https://img.shields.io/badge/šŸ‘Ž%20Out%20of%20PR%20scope-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/1b42eaa5-3d9c-416f-bbba-918d78905560?what_out_of_scope=true) [![Not in coding standard](https://img.shields.io/badge/šŸ‘Ž%20Not%20in%20our%20standards-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/1b42eaa5-3d9c-416f-bbba-918d78905560?what_not_in_standard=true) [![Other](https://img.shields.io/badge/šŸ‘Ž%20Other-white)](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/1b42eaa5-3d9c-416f-bbba-918d78905560)

šŸ’¬ Looking for more details? Reply to this comment to chat with Korbit.

Originally posted by @korbit-ai[bot] in https://github.com/apache/superset/pull/35096#discussion_r2337718805

Comment From: dosubot[bot]

Hi @ismaelricopalasios-maker! I'm Dosu and I’m helping the superset team.

Superset's theming system expects all necessary tokens, like colorText and colorTextSecondary, to be defined in the active theme. There is no fallback logic (such as colorTextSecondary || colorText) implemented in the codebase, and components should not rely on such fallbacks. If a token is missing, the system either uses Ant Design's default or the value is simply absent. This design matches the recommendation to use a single theme color variable for consistent behavior across themes, as relying on fallbacks can cause the kind of visual inconsistencies you described when switching themes. Defining and using only one variable (like theme.colorText) is the intended and most robust approach for consistency across all themes1.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report šŸ› | Other  Chat with Dosu Join Discord Share on X