Vlocity Facts #12 | CSS changes to an OmniScript elements

For example: If their is a requirement where you need to change the color of the button or you need to add some custom styling of the elements. instead of creating templates you can follow this approach. 

For applying CSS changes to the elements all over the OmniScript.

1. Inspect the element  by right-clicking on the element and selecting Inspect.

2. Locate the Styles tab next to the Elements tab and copy the class for the element's div to your clipboard.
3. Navigate to Script Configuration > HTML Custom Templates and add opening and closing style tags <style> </style> and write CSS for the desired changes using the class that was copied as your CSS Selector.
4. Navigate back to Preview to see the changes in effect for each step.

This is other example for text element, here you can see the difference between the 2 text elements font-size. This is for single element on each step.
Use this code
 #Text1 ~ label { 
     font-weight: bold;
     font-size: 1.5rem
}
Text1 is the ElementName according to your element name you can change
By following this process you can add CSS styling to the elements all over the OmniScript.

=========================================================================

  • For more Details about DataRaptors and Types check this link DataRaptors
  • For OmniScripts elements refer this link OmniScript Elements -1
  • How to launch Omniscript in difference ways Launch Omniscript
  • Resources: Vlocity Resources
  • Best Practices of OmniScript, Integration Procedure, Data Raptors
  • Debugging Angular OmniScript. 

  • Comments

    Popular posts from this blog

    Vlocity Facts #01 | OmniStudio DataRaptors

    Vlocity Facts #34 || Getting the details from the URL in a FlexCard and an Omniscript

    Vlocity Facts #44 || Communication between Omniscript and Flexcard [Pub/Sub]