You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, there is a developer preview for CSS variables. I wanted to use them in my project because it is completely based on CSS variables. But the problem is I can't figure out how to implement dark theme with CSS variables. It seems the provided CSS variables are only for predefined colors, not backgrounds, borders, etc. So it would be great if we have a way to implement dark theme with CSS variables.
What does the proposed API look like?
I think there are two ways we can approach this.
We can have another theme file for dark variables like the default one. e.g. ng-zorro-antd.variable-dark.css
So we can use it conditionally in our styles.
We can have variables for all parts of the theme like backgrounds, borders, etc. So we can change every color with CSS variables. Something like what Ionic do: https://ionicframework.com/docs/theming/dark-mode
The text was updated successfully, but these errors were encountered:
What problem does this feature solve?
Right now, there is a developer preview for CSS variables. I wanted to use them in my project because it is completely based on CSS variables. But the problem is I can't figure out how to implement dark theme with CSS variables. It seems the provided CSS variables are only for predefined colors, not backgrounds, borders, etc. So it would be great if we have a way to implement dark theme with CSS variables.
What does the proposed API look like?
I think there are two ways we can approach this.
We can have another theme file for dark variables like the default one. e.g.
ng-zorro-antd.variable-dark.css
So we can use it conditionally in our styles.
We can have variables for all parts of the theme like backgrounds, borders, etc. So we can change every color with CSS variables. Something like what Ionic do:
https://ionicframework.com/docs/theming/dark-mode
The text was updated successfully, but these errors were encountered: