Skip to content

Dark mode background color not applying when body styles are extracted using @apply #3942

@david-buck

Description

@david-buck

I have this in my globals.css:

body { @apply font-body antialiased max-w-xl mx-auto text-gray-900 bg-white dark:bg-gray-800 dark:text-white transition-colors; }

And it works in the old way, but with JIT, it doesn't apply the dark:bg-gray-800, while the dark:text-white works fine.

The result is white text on a white background in dark mode.

Background colour changes to other elements apply fine, only body is unaffected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions