Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello,
I am attempting to create a font range for the Announcement Bar on the Dawn Theme with the following:
<p style='color: {{ block.settings.text_color }}; font-size: {{ block.settings.font-size}}px; ' class="announcement-bar__message {{ block.settings.text_alignment }} h5">
{{ block.settings.text | escape }}
{%- if block.settings.link != blank -%}
{% render 'icon-arrow' %}
{%- endif -%}
</p>
{
"type": "range",
"id": "font_size",
"min": 12,
"max": 24,
"step": 1,
"unit": "px",
"label": "Font size",
"default": 16
}
I am able to get the font-size range to show up on the announcement bar, but the size is not actually adjusting when moving the range back and forth. I think I am just referencing the block setting wrong, or maybe on the wrong line?
Appreciate any help.
Solved! Go to the solution
This is an accepted solution.
Hi @gabe571
Pls check your code, you define 'font_size' at below
This is an accepted solution.
Hi @gabe571
Pls check your code, you define 'font_size' at below
Ah, good ol' user error. Thank You!
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025