Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Dark mode incompatible with bg-opacity classes #27

Closed
laugharn opened this issue Mar 15, 2021 · 2 comments
Closed

Dark mode incompatible with bg-opacity classes #27

laugharn opened this issue Mar 15, 2021 · 2 comments

Comments

@laugharn
Copy link

When using bg-* dark:bg-* with bg-opacity-*, the opacity class is ignored in dark mode. This works correctly in AOT/classic mode.

Reproduction repo: https://github.com/laugharn/jit-repro

@adamwathan
Copy link
Member

Hey thanks for opening this! This is actually the same behavior as in AOT mode, see similar issue with previous discussion here:

tailwindlabs/tailwindcss#2966

Some kinks in there still around how the behavior changes depending on which mode you use — hopefully something we can think of a solution for in v3.

Going to close because unless I'm misunderstanding (I might be, apologies if so!) this is actually intended at the moment 👍🏻

@laugharn
Copy link
Author

laugharn commented Mar 15, 2021

@adamwathan that's interesting, in darkMode: media on 2.0.3 it works as I would expect, as seen in the backdrop-filter'd overlay in the attached screenshots:

Light Mode bg-black

image

Dark Mode dark:bg-white

image

Should I assume this will stop working? My use case isn't very complicated and I'll refactor both modes to key off of a neutral gray instead, but I would consider this breaking-ish.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants