GitHub user VasilijeBursac edited a discussion: Button text fontWeight 
customization via theme tokens (Superset 6)

Hello everyone,


I’m trying to customize button text font weight in Superset 6, but it seems 
this is not possible through theme tokens, and I wanted to check if this is 
expected behavior.

In Superset 5, button text appeared to use a slightly thicker font weight 
(around 600), whereas in Superset 6 it looks lighter (around 500). This makes 
buttons, especially secondary and disabled ones, less visually prominent, 
particularly in darker themes.

I attempted to override this by using the `fontWeight `token from Ant Design on 
the Button component. This works correctly in the AntD theme editor, but it 
does not work when applied via Superset’s Theme CRUD UI.

After investigating further, it seems that `fontWeight `is not included in the 
list of allowed theme tokens in `types.ts`, which prevents it from being 
applied through Superset themes.

This would be especially useful because:
- Button background colors for variants (primary, secondary, disabled) are, by 
default, calculated automatically by theme algorithms.
- Increasing font weight would significantly improve readability and 
visibility, particularly in dark themes.

Is this limitation intentional in Superset 6?
If so, is there a recommended workaround?
Otherwise, would it make sense to allow `fontWeight` as a valid theme token for 
buttons?


Thanks in advance! @rusackas @msyavuz

GitHub link: https://github.com/apache/superset/discussions/37373

----
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]

Reply via email to