• hmijail

    (@hmijail)


    I am trying to add my own CSS class to Lyte blocks – so that I can whip up my own solution to ignore clicks until a cookie is set.

    However, once in the browser, the Lyte blocks have lost the “additional CSS” that the Youtube blocks had in the WordPress editor.

    I have also tried using the Lyte shortcodes, but I don’t see any way to add CSS classes to them.

    Is this a bug? Or, any suggestion on how to do this?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter hmijail

    (@hmijail)

    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.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    how/ where are you adding the CSS hmijail ?

    Thread Starter hmijail

    (@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.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    maybe try adding it in Appearance -> Customize -> Extra CSS instead?

    Thread Starter hmijail

    (@hmijail)

    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.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    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?

    Thread Starter hmijail

    (@hmijail)

    Yes, that is basically what the hack I mentioned of “video block inside of group block” does. Though it’s messy…

    blingcompany

    (@blingcompany)

    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!!!!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    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) 🙂

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Loses the “additional CSS”’ is closed to new replies.