How do I have a custom colour for each indivudal dynamic section?

Highlighted
New Member
3 1 0

I have a dynamic section and the background-color can be changed by the client. When the background-color is changed, they all change and I want to just target the individual dynamic section. Code has been stripped to make it clearer, thanks in advance.

settings_schema.json

"name": "Colors",
    "settings": [
      {
         "type": "color",
         "id": "image_text_bg",
         "label": "Background",
         "default": "#f4f4f4"
      },
]

 scss

.image-text-section {
  background: {{ settings.image_text_bg}};
}

.image-with-text.liquid --> dynamic section

<section class="image-text-section">

</section>

 

0 Likes