Closed jaetea closed 1 year ago
To my knowledge this isn't and has never been possible. What is the motivation behind this, do you want to optimize your bundle size? Or is there anything else?
In general this sounds like a reasonable feature. In case the dark theme styles are skipped, calls to the setDarkTheme()
method should result in an error.
We are just looking to reduce the file size and optimize the bundle size.
I had a deeper look. Actually most of the dark theme code is being skipped with your approach already. There were just some minor oversights, like you pointed out, with only little impact to the bundle size. Anyways, I will fix this soon for v5.
On version 3.0 and setting $mat-css-dark-theme-selector to false just generates "false" as a string.
I tried commenting it out in the variables file and get this error.
Error: Undefined variable. ╷ 71 │ $dark-theme-selector: $mat-css-dark-theme-selector, │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ╵
Is there a way to NOT generate the additional classes for dark theme?