DEV Community

Discussion on: Using the PostCSS plugin Let your WebApp support dark mode

Collapse
 
mauron85 profile image
Marián Hello

This is IMHO best solution to the problem. But I have problems with my builds. Sometimes the builded css is perfectly fine, but sometime is broken, meaning that css is missing classes. I think it's related to my setup only, where I'm using it on ant design project and not all components have separate index.js and dark-theme.less and default-theme.lss. Only the root component has. Anyway I wanted to say thank you for inspiration.

Collapse
 
maqi1520 profile image
Alex Ma

Antd dynamic packaging will be some troubles. You can use Antd v4, It have css variables.

Collapse
 
mauron85 profile image
Marián Hello

I want to preserve IE11 compatibility for some time. Anyway I found problem with the plugin. Will post PR.

Thread Thread
 
maqi1520 profile image
Alex Ma

Thank you very much.