As a hackish workaround, I found that I can add CSS classes by encasing the YT video in the editor within a group, and adding the classes to the group instead of the video. This works.
Still, this made me realize that Lyte is losing other CSS classes that the YT video block had even before I added mine (they seem to come from other plugins). So this loss is probably breaking something.
how/ where are you adding the CSS hmijail ?
In the “Additional CSS Classes” box, in the Advanced section when one selects a YT block in the WP editor.
I can create a GitHub issue with a screenshot if you prefer.
maybe try adding it in Appearance -> Customize -> Extra CSS instead?
But that’s for a different purpose; that one applies to the whole page. The “Additional CSS classes” box is to add classes to individual blocks. So, for example, I can add an “ignore-clicks” class to the video block, and then define the “.ignore-clicks {…}” in the Extra CSS section.
ah, afraid LYTE doesn’t keep classes added on the video element itself, but try wrapping the video in it’s own div (block) and add your custom class to that one maybe?
Yes, that is basically what the hack I mentioned of “video block inside of group block” does. Though it’s messy…
Please fix the incompatibility problem of Autoptimize and Asycn with respect to Elementor because in the elementor editor the “Additional CSS” look good but when you publish it the changes are not applied…
it’s a shame that this happens because this plugin (Autoptimize and Async) are amazing! I hope you can fix it please.
For those who have the same problem as me, you can go to the wordpress menu (the dashboard) > Appearance > Add Additional CSS and as a workaround it fixes it but it’s not the same as using it directly with elementor.
Thank you very much for your time, I will be attentive to the correction of this problem or for any news, thank you!!!!
well, AsyncJS does not do anything to CSS, so no blame to be laid there.
re. autoptimize; better ask for support on the AO forum instead of hopping onto
another thread which is only vaguely related (this one is not about Elementor nor Autoptimize) 🙂