Hi again Aert. Sorry to open this back up. I’ve heard back from the plugin makers and this is what they said:
This happens because the cookie banner is not part of the HTML, but instead inserted into the page by JavaScript. The critical css generation only sees the original HTML of the page, but you can configure it to also include the styles for this cookie banner:
Go the Autoptimize > CriticalCSS > Advanced Settings > Force include CSS selectors,
and then you need to fill in the text box with the CSS selectors that are needed for the cookie bar styles.
You can start with this value:
//#cc-window,//.cc-window
I think that covers the layout for the cookie banner itself, but I also think you need to find and add a few more classes to get the banner perfectly styled.
So my question is, do you have a list of CSS selectors that I should definitely add in addition to the ones he suggested? I don’t want to mess anything up.
Really appreciate the help!
Best,
Andrew