Hi guys!
Hoping someone can help me apply our custom fonts to the Shopify Forms Headers - from Inspect tool I can see the attachedbut no idea how to use this info to apply the custom font:
A user is trying to apply custom fonts (specifically âUnboundedâ) to Shopify Forms headers but cannot target them with standard CSS methods.
The Problem:
<form-embed>) with encapsulated ShadowDOMThe Solution:
A community member provided a workaround involving:
layout/theme.liquid<form-embed> element appears in the DOMStatus: Resolved with a technical solution provided, though implementation requires JavaScript rather than pure CSS.
Hi guys!
Hoping someone can help me apply our custom fonts to the Shopify Forms Headers - from Inspect tool I can see the attachedbut no idea how to use this info to apply the custom font:
were you able to solve this? I canât target it too using CSS.
BUMP!!
Shopify Forms use Web Components (). This is why the usual styling fixes are not working as itâs encapsulated in a ShadowDOM.
Also, since loads asynchronously and its shadowRoot doesnât exist right away, youâll want to observe the DOM for when it appears.
If you open âlayout/theme.liquidâ and add this script, this will allow you to edit the styles. Do remember that as youâre editing the style object, youâll need to use the camelCase names for the style attributes.
Hope this helps!
Iâve added a solution to style the forms for you. Check my reply above.