You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As one user in the support forums reported, the plugin is adding the below inline styling to images if the "Dominants Color" option is enabled. style="--dominant-color: #332f2b;"
One of the problems with this, is that it is overwriting any existing inline styling associated with any images. An example of this can be demonstrated in the below recording, where you'll find that my own custom inline styling is removed, in place of the PL inline styling. As soon as I disabled the "Dominant Color" option my custom inline styling is applied once more.
RCftJNRKDw.mp4
To resolve this, consider moving away from inline styling. Printing the styling to the wp_head as opposed to within the img element also resolves this error. Tested with the below, which doesn't conflict with the "Dominant color" configuration styling:
Note also that there is a GitHub issue in relation to not allowing themes or plugins to insert inline styling.
Steps to reproduce
Ensure you have the Performance Lab plugin active but the "Dominant Color" option disabled
Create a new post and switch to the code editor.
Add some inline styling to an image or paste the code snippet highlighted below (Example snippet) into your content. Check that the styling does work as intended by visiting the front end of your site and viewing that page
Enable the "Dominent Color" option
Revisit the page on your site where you added your own inline styling
Refresh the page and notice that your own custom inline styling is replaced
Bug Description
As one user in the support forums reported, the plugin is adding the below inline styling to images if the "Dominants Color" option is enabled.
style="--dominant-color: #332f2b;"One of the problems with this, is that it is overwriting any existing inline styling associated with any images. An example of this can be demonstrated in the below recording, where you'll find that my own custom inline styling is removed, in place of the PL inline styling. As soon as I disabled the "Dominant Color" option my custom inline styling is applied once more.
RCftJNRKDw.mp4
To resolve this, consider moving away from inline styling. Printing the styling to the
wp_headas opposed to within theimgelement also resolves this error. Tested with the below, which doesn't conflict with the "Dominant color" configuration styling:Note also that there is a GitHub issue in relation to not allowing themes or plugins to insert inline styling.
Steps to reproduce
Example snippet