With the Custom Script Feature in Campaigns, you can add custom CSS and JavaScript to your campaigns. When it comes to CSS, most styling can be done directly in the UI with the component settings, but there will always be use cases where you want to add some extra touch. This is where custom script comes in handy.
In this article, we've gathered some common CSS snippets that you can use. For JavaScript, check out this article.
The custom Script Feature is available from the PRO plan and up! π
General best practices with CSS in Triggerbee
CSS applied to Custom Script will not be rendered in the editor, but you will see it when you preview or publish your campaign
You can use the Advanced ID setting to set an ID on your component to access it via CSS. The ID will be added as a data-external-ID to your component and can be accessed via:
div[data-external-id="YOURID"]
All of these snippets are examples of what can be done. They are not copy-paste-and-go; they must be configured to match your website.
Change the color of the copy check mark
var tbCheckMark = widget.querySelector(".checkmark-circle");
tbCheckMark.style.backgroundColor="#ff66c4";
widget.shadowRoot.querySelector(".checkmark").style.borderColor="#FFF";