Styles in Custom Element Stopped Working After Updating to Pro 5.0.8 _Support

Hey guys!

I have created some custom elements based on the guide here.

Early last year though around January when an update was released, the CSS in those custom elements stopped working. Another user posted about this issue here which solved the issue which is to simply change $mod_id to $style_id .

I have just updated to Pro 5.0.8 and I am having the same issues again where the dynamic CSS that are in the style function I have are not getting applied to the custom element again.

Is there anything that I need to change in the code again? I tried checking the core elements to see how they are coded now but I am unsure about the best way to update my code that will reflect the new changes in the Element API (if there are any).

Thank you.

Here are some snippets I have in my code:

// Define Element
// =============================================================================

$data = array(
'title'     => __( 'Custom Element', '__ce__' ),
'values'    => $values,
'builder'   => 'builder_setup_custom_element',
'style'     => 'style_custom_element',
'render'    => 'render_custom_element',
);

// Register Module
// =============================================================================

cs_register_element( 'custom-element', $data );

// Style
// =============================================================================

function style_custom_element() {

    ob_start();

    ?>

    .$_el.custom-element svg {
        width: $icon_size;
    }

    .$_el.custom-element.encircle {
        width: $container_size;
       height: $container_size;
    }

    .$_el.custom-element .text-link {
        font-size: $font_size;
        letter-spacing: $letter_spacing;
    }

    <?php return ob_get_clean();

}

thank you in advance

Hi @deranaloge,

Thanks for reaching out.
I have checked the Sample Element and found the issue with the latest version. I suspect this could be a bug on the latest version theme and have reported it to the developers for further investigation.

Thanks

Hello tristup,

thank you, i hope it will be fixed soon, because we can´t develop further…

cheers

Hi @deranaloge,

You are most welcome. I have already reported this to our development team for further investigation.

Thanks

hi,
any news on this? because we cant work on the elements without a solution or a fix.
@alexander is there a fix?

thanks in advance

Hello @deranaloge,

We have already reported the issue and the issue is in our issue tracker for our development team. There is no ETA at the moment so I would request you, please stay tuned for succeeding theme updates.

Thanks for understanding

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.