Tag Color change

Hi guys, here is a short code snippet which you can use to change the color of tags in our new V5 dynamic blocks.

You need to add it to the page Settings → Custom Code → Header. Before using, ensure that you’ve included the corresponding BlockID and Tag name in the custom code.

Here is the short code snippet for the table block:

<style>
/* Change text color based on the data-content of the div */
#BlockID div[data-content="Tag name"] span {
color: red;
}
/* Change background color when the div has a specific data-content */
#BlockID div[data-content="Tag name"] {
background-color: #FEF4F5;
}
</style>

Here is the short code snippet for the other new dynamic blocks:

<style>
/* Change text color of the span based on the data-content of the div */
#BlockID ul li div[data-content="Tag name"] span {
color: blue;
}
#BlockID ul li div[data-content="Tag name"] span {
color: green;
}
/* Change background color of the li when the div has a specific data-content */
#BlockID ul li div[data-content="Tag name"] {
background-color: #E0F0FF !important;
}
#BlockID ul li div[data-content="Tag name"] {
background-color: #E0F7E9 !important;
}
</style>
1 Like