• Here’s one example you might add to your plugin page to help people get started (it was a bit of a learning curve for me to synthesize the WP way + css variables + a basic understanding of light-dark modes to figure this out):

    .theme-dark {
    --wp--preset--color--base: #333;
    --wp--preset--color--contrast: #fff;
    /* and so on using the color slugs in your theme... */
    }

    It was interesting to know that all that is happening is the class .theme-dark is being added to the HTML wrapper. Helped me understand the context of the cascade and how it all happens

    • This topic was modified 8 months, 2 weeks ago by James Monroe.
    • This topic was modified 8 months, 2 weeks ago by James Monroe.

The topic ‘Example to add to plugin documentation’ is closed to new replies.