gabotorresruiz commented on code in PR #35220:
URL: https://github.com/apache/superset/pull/35220#discussion_r2373170402
##########
superset-frontend/packages/superset-ui-core/src/theme/types.ts:
##########
@@ -78,6 +78,7 @@ export type SerializableThemeConfig = {
algorithm?: ThemeAlgorithmOption;
hashed?: boolean;
inherit?: boolean;
+ cssVar?: boolean | { key?: string; prefix?: string };
Review Comment:
The `cssVar` property is an `Ant Design` theme configuration option that
controls whether CSS variables are generated for the theme tokens.
According to the official Ant Design documentation at -->
https://ant.design/docs/react/css-variables:
- **cssVar:** true - Enables CSS variables for all theme tokens (e.g.,
--ant-color-primary)
- **cssVar:** false - Disables CSS variables (default)
- **cssVar:** { key?: string; prefix?: string } - Enables CSS variables with
custom configuration:
- **key:** The key for the CSS variables container (helps with theme
isolation)
- **prefix:** The prefix for CSS variable names (default: 'ant')
This allows themes to expose their design tokens as CSS variables that can
be used in custom CSS/styled-components. For example, when enabled, you could
use `var(--ant-color-primary)` in your CSS.
I wanted to preserve this in our `SerializableThemeConfig` type to ensure
full compatibility with Ant Design's theming system -->
https://ant.design/docs/react/customize-theme#theme
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]