Correct method of overwriting plugin CSS with new CSS containing Theme Styles Color Values?

[ad_1]

I am using **Twenty-Twenty-Three as my theme** along with the **Essential Blocks Plugin**.

**Essential Blocks plugin uses a default purple color theme** throughout its entire block library which **I would like to overwrite with colors available from Appearance > Editor > Styles > Colors**.

**Objectives I would like to achieve:**

* Overwrite default plugin colors with Theme Editor Color Styles.
* Retain User’s ability to customize colors via the Block Settings Panel.

**I have tried the following strategies:**

1. Including **custom CSS within WP Headers & Footers** (*with & without !important property*)

* Result:
* Without !important – nothing happens.
* With !important, Users lose the ability to customize via the Block Settings Panel.

1. Deregistering & dequeuing plugin stylesheets, moving their contents to my own file & modifying custom stylesheet to use Theme color variables. Registering & Enqueuing the new custom stylesheet.

* Result:
* Frustratingly inconsistent.

​

What is the right method for achieving my objectives?
What is the right hierarchy for achieving consistent results?

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer