CMS Development

ngifford
Member | Elite Partner
Member | Elite Partner

How to setup default styling in a theme DnD text module

I can’t find documentation on how to set default styling of a core text dnd_module (background, typography, etc). I currently have a new theme build and working on a template within that theme. I have this for the module:

 

{% dnd_module "form_title" path="@hubspot/text",
   label="LP Form Title", 
   value="Pre-Order Now",
   horizontal_alignment="CENTER",
%}
{% end_dnd_module %}​

The horizontal_alignment is working and applying that by default for the text. But I can't seem to get anything to work here to apply a default background color, default typography styles, etc.

 

What are the possible elements and values that can be used here? I know I can style all of this at the page level, but I want to have these parameters all setup by default. Thanks for any help!

0 Upvotes
1 Reply 1
kamlesh_k
Member | Diamond Partner
Member | Diamond Partner

How to setup default styling in a theme DnD text module

you can set background-color example see below and you can set typography in "theme-overrides.css". there is whole theme typography which is including theme setting.

{% dnd_section %}
  {% dnd_column 
      background_color={
        'r': 123,
        'g': 123,
        'b': 123,
        'a': 1.0
      },
  %}
  {% end_dnd_column %}
{% end_dnd_section %}

 

 

0 Upvotes