Community forum for knowledge and support

Updated 12 months ago

The Appropriate Use of Style Tags in Custom Code Blocks

At a glance

The community member is asking whether it's okay to use < style > tags in custom code blocks, as they've noticed several Relume components doing this. They've had an SEO audit flag this as 'Critical' and are wondering about the general consensus. The comments indicate that this includes Relume global styles, and that the community member likely wouldn't want to move the global styles to the head as that would prevent them from appearing in the designer canvas. For other embeds, the recommendation is to move them to a more centralized location like the custom code section of the site settings or global styles, depending on the importance of seeing them in the designer canvas.

<style> tags in custom code blocks. Okay or not? I notice several Relume components do this. I’ve had an SEO audit flag this up as ‘Critical’! It’s not a huge deal for me to move them to the head but was just wondering the general consensus.</p>

D
M
2 comments

This includes Relume global styles as well.

you'd likely not want to move the global styles to the head as then those changes won't appear within designer canvas visually. For other embeds that we sprinkle within a component, I would recommend moving those to a more centralized location like the custom code section of your site settings or global styles - again depends on the code and if its important to you that you see them in designer canvas or not.

Add a reply
Sign up and join the conversation on Slack