a17t icon indicating copy to clipboard operation
a17t copied to clipboard

dark mode

Open jrydberg opened this issue 3 years ago • 2 comments

would be great with either support and/or guidance on how to work with dark mode and a17t. would be awesome if there were dark variants for the ~color classes so one could write ... className="button ~blue dark:~green. or somehow define what ~positive should be in dark mode.

jrydberg avatar Feb 25 '22 23:02 jrydberg

You can currently do this pretty easily! You just need to generate two different versions of your CSS (with different color configs) — one for light mode and one for dark mode — and activate them as necessary. Plus, since a17t is a Tailwind plugin, you should be able to do dark:~green.

You're right that there should be an "official" way of doing this in the docs.

milesmcc avatar Feb 25 '22 23:02 milesmcc

I believe I tried dark:~x and didn't get it to work, but I can try again. Maybe it was because of my somewhat strange setup ( I have hackup ~white and ~black colors).

jrydberg avatar Mar 01 '22 05:03 jrydberg

Feel free to reopen if this isn't resolved, but this should be resolved. It might be a CSS purging thing?

milesmcc avatar Aug 23 '23 02:08 milesmcc