primeng icon indicating copy to clipboard operation
primeng copied to clipboard

PrimeNG18 Beta: Dark mode selector not applied

Open Szanik opened this issue 5 months ago • 1 comments

Describe the bug

Using the new primeng 18 beta 1 version. tailwindcss is installed like in the documentation and i am using the primeconfig like this:

 this.config.theme.set({
      preset: Noir,
      options: {
        prefix: 'p',
        darkModeSelector: '.my-dark',
        cssLayer: false
      }
    }
    );

now i am using in a normak div this class: bg-surface-0 dark:bg-amber-400

The div is always displayed in amber. Doesn't matter if the html has the class="my-dark" or not.

Interestingly. If I change the darkModeSelector to system and simulate the preferred-color-scheme with the dev console the colors are shown correctly.

Maybe a bug, or maybe I am using this wrong.

Also are there documentations on what css classes to use when using primeng? Or should one use the tailwindcss classnames?

thank you

Environment

primeng 18 beta 1 angular 18.2 tailwindcss-primeui: ^0.3.4 tailwindcss: "3.4.10

Reproducer

No response

Angular version

18.2

PrimeNG version

18.beta.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.15.0

Browser(s)

Edge 128

Steps to reproduce the behavior

No response

Expected behavior

No response

Szanik avatar Sep 07 '24 16:09 Szanik