I am modifying a section file. I’ve added in a bg_color setting that works as expected. In addition to that I’d want to add in a text_color picker.
My settings are not overriding the native CSS at the moment.
Any suggestions?
{%- liquid
assign page = section.settings.page
assign section_content = section.settings.content
assign bg_color = section.settings.bg_color
assign text_color = section.settings.text_color
-%}
{%- if page or section_content != blank -%}
<div class="container {{ bg_color }} ">
<div
class="lg:grid lg:grid-cols-12 lg:gap-x-10 lg:items-start"
id="section-inner--{{ section.id }}"
{% if section.settings.use_jump_link == true %}
data-js-jump-link-id="{{ section.id }}"
data-js-jump-link-label="{{ section.settings.jump_link_label }}"
{% endif %}>
<div class="lg:col-span-8 lg:col-start-3 pt-[48px] lg:pt-[96px]">
<div class="general-content__wrapper overflow-hidden {{ section.settings.content_adjust }}">
{% if section_content != blank %}
{{ section_content }}
{% else %}
{%- render 'shortcode-content', _content: page.content -%}
{% endif %}
</div>
</div>
</div>
</div>
{%- render 'spacer',
_mobile_space: section.settings.bottom_padding_mobile,
_desktop_space: section.settings.bottom_padding_desktop -%}
{%- endif -%}
{% schema %}
{
"name": "Wysiwyg",
"tag": "section",
"class": "wysiwyg-section",
"settings": [
{
"type": "header",
"content": "Page"
},
{
"type": "page",
"id": "page",
"label": "Page"
},
{
"type": "richtext",
"id": "content",
"label": "Content",
"info": "Custom content for WYSIWYG section. This content will override page content if populated."
},
{
"type": "select",
"id": "content_adjust",
"label": "Content Adjustment",
"options": [
{
"label": "Left",
"value": "left-text"
},
{
"label": "Center",
"value": "center-text"
}
],
"default": "left-text"
},
{
"type": "header",
"content": "Jump Link Settings"
},
{
"type": "select",
"id": "bg_color",
"label": "Background Color",
"info": "Accent color selections will default to 'Dark Grey' for Singer brand.",
"options": [
{
"value": "bg-white",
"label": "White"
},
{
"value": "bg-grey-1",
"label": "Light Grey"
},
{
"value": "bg-grey-6",
"label": "Dark Grey"
},
{
"value": "bg-accent-1",
"label": "Accent 1"
}, {
"value": "bg-accent-2",
"label": "Accent 2"
}
],
"default": "bg-accent-1"
},
{
"type": "checkbox",
"id": "use_jump_link",
"label": "Use Jump Link",
"default": false,
"info": "This field is for sticky TOC"
},
{
"type": "text",
"id": "jump_link_label",
"label": "Jump Link Label"
},
{
"type": "header",
"content": "Spacing"
},
{
"id": "bottom_padding_mobile",
"label": "Bottom Padding - Mobile",
"type": "range",
"min": 0,
"max": 200,
"step": 2,
"default": 0
},
{
"id": "bottom_padding_desktop",
"label": "Bottom Padding - Desktop",
"type": "range",
"min": 0,
"max": 200,
"step": 2,
"default": 0
}
],
"presets": [
{
"name": "Wysiwyg",
"category": "Homepage"
}
]
}
{% endschema %}