Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Is dark mode broken on the Payload-NextJS setup?

default discord avatar
derosul2 years ago
8

Whenever switching to dark mode, it's a mix between the light theme and dark mode for payload.


Light theme looks perfectly fine...



Oh and good to mention, console doesn't show a thing, no errors loading anything on the network tab either.

  • default discord avatar
    angelok27412 years ago

    Not sure buy maybe we also have to load in the css in withPayload as it accepts a cssConfig aswell

  • discord user avatar
    jarrod_not_jared
    2 years ago

    Are you loading your own css? Is it overwriting payloads css?

  • default discord avatar
    angelok27412 years ago

    For me both light and dark are not working properly, not loading any custom





  • discord user avatar
    jarrod_not_jared
    2 years ago

    Does the demo load properly for you?

    https://demo.payloadcms.com/admin/account
  • default discord avatar
    angelok27412 years ago

    ye it does

  • default discord avatar
    derosul2 years ago

    Yup!



    Only css im using is tailwind



    So let me try to disable that.



    Yup! it's tailwind!



    @281120856527077378

    🙂



    @839912789560000522

    you're using Tailwind as well?



    Okay, managed to fix it. I was trying to make the admin page work for the

    pages

    directory instead of the

    app

    directory. The

    pages

    directory always loads the

    _app.tsx

    file and the stylesheets registered in there.



    Apparently you can use both the

    app

    directory and the

    pages

    directory along each other, so moving the payload pages back to the

    app

    directory seems to work just fine 🙂

  • default discord avatar
    angelok27412 years ago

    Ah yes, i am using tailwind aswell. Created a new nextjs with tailwind flag

  • default discord avatar
    skiabox_68085last year

    I am on the same boat guys here.



    Switching the operating system (mac os) to the dark mode make a lot of page elements disappear.



    How did you manage to solve this?

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.