Dynamic class on shopify-section div

New Member
4 0 0


I'm developing a site and I want to add a setting to all sections in the customiser that the merchant can use to set a background colour from a pre-defined palette to the section they're working on. I'm going to use a drop down select box setting populated with the available colour palette to do this.

I'm using the Debut theme as a starter.

I have three questions:

1) Is there a general schema that can be used to add settings to all available sections, or will I need to implement this individually in every section's schema.

2) I want the background colour to apply to the shopify-section div which is the parent div that wraps around every section. Is there a way to apply a setting set in a particular section to that wrapping div?

3) I thought a way of doing this would be to add a custom class, which I read gets applied to the parent shopify-section div. However, I don't know if there's a way of bringing the selected setting into the schema to populate that custom class setting - is there a way to do this?