• equaltozero

    (@equaltozero)


    Hello! Priority problem!

    It’s very, but very important to have somewhere on the body or on the html elements, a class name for activate/deactivate detection. And the plugin does not have this option, directly from PHP, not from JS…

    This made for developers, an issue, regarding the CSS and other code priority and order , to execute some other conditions.

    Please fix this, it’s important.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Prince

    (@princeahmed)


    Hello,

    First and foremost, we sincerely apologize for any inconvenience you may have experienced.

    I’d like to provide some insights regarding the usage of our plugin. When dark mode is activated, the plugin automatically appends the attribute data-dracula-scheme="dark" to the HTML tag. This allows you to tailor your CSS specifically for dark mode by utilizing the data attribute in the following manner:

    html[data-dracula-scheme=”dark”] {
    /* Insert your Dark Mode-specific CSS here */
    }

    Additionally, our plugin triggers JavaScript events to signify the activation or deactivation of dark mode. You can detect these changes in your JavaScript code using event listeners, as shown below:

    document.addEventListener(‘dracula:enable’, function () {
    console.log(‘Dark mode enabled’);
    });

    document.addEventListener(‘dracula:disable’, function () {
    console.log(‘Dark mode disabled’);
    });

    We hope this information assists you in effectively using our plugin. If you have any further questions or encounter any issues, please don’t hesitate to reach out. You can either post your query on our plugin forum at Dracula Dark Mode Support or contact us directly through our support system at SoftLab Support for a prompt response.

    Thread Starter equaltozero

    (@equaltozero)

    Hello!

    Thanks for your reply.

    The problems are because that custom HTML “data-” is activated wi5 JS, not with PHP, direct from the server.

    So… it’s very important to be in php, because in custom development when you have situations to use something before your JS is doing something , in that case the dark mode is activated only on you JS function…

    I’m waiting for news.

    —————————————

    – Kind Regards!

    Giurgiu Radu
    Web Developer

    ◉ E-mail: radukam@gmail.com
    ◉ Skype id: radukam
    ◉ Phone/Whatsapp: +40755273136

    Plugin Author Prince

    (@princeahmed)

    Hi Giurgiu Radu,
    You are correct, the dark mode is activated and deactivated using JS and there is no usage of PHP on the dark mode usage.

    So, it is impossible to detect if the dark mode is enabled/ disabled using php from the server.

    And, there is no way to implement this using PHP.
    I hope you will get this.

    Thread Starter equaltozero

    (@equaltozero)

    What? There’s no way to what? 🫣🙂

    Just as a simple class to the body, that’s it!

    And based on that, you can do anything after!

    So…

    😉

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this review.