Adding to <body>

Is there any way to add to the body class? I assume it’s good practice to use as many settings as possible under ‘Project Settings’ for typography, etc. But how would I set other properties that might normally fit into ? Is there an option screen I’m not seeing? Thanks.

Aaron

Just add your code in page settings, Head Code.

For adding classes to body try this in the footer of the page settings.

_jQuery way_
<script>$(document.body).addClass('your-class-here');</script>

or 

_vanilla javascript way_
<script>
var element = document.querySelector('body');
element.classList.add('your-class-here');
</script>

Hi @Norm,

I hope to see the ability to add classes to the body of any page. Just a textfield and maybe support for multiple classes with a comma would suffice. The idea of styling the body doesn’t address the issue in any way.

The classes would be used for scoping and specificity I’m curious what you think, and if it’s low enough hanging fruit for you to tackle anytime soon. In my opinion this is a missing feature. If it’s cool to add a class to a bric or a bloc it’s equally beneficial to add a class to the body.

Cheers.