How does visual composer and beaver builder adds dynamic classes to style in front end?

169 views Asked by At

I am working with visual composer and beaver builder plugin in my development, but having some strange thing which Never done by me. I am seeing when ever I hit publish my page data, and inspect in the browser it shows some dynamic classes and once I style them by those classes on refresh those are gone and I am unable to access those classes ???

I want to know how they actually do this ? what's the best way to get such type of development standards ? As I never seen such thing before in my entire career.

My question is how they generate those dynamic classes ? And how to style by using those generated classes ???

Here is screen shot of the code in browser inspection

1

There are 1 answers

2
Rafael Baylon On BEST ANSWER

isn't that dynamic classes is also the node id? you can access it in your frontend.php or frontend.css.php eg:

.fl-node-<?php echo $id; ?>{
    width:100%;
}

to anwser your question how they generate that node id you can check it on class-fl-builder-model.php then find the generate_node_id()