How I can add class to a body tag for CMS page via Layout Update XML. I am trying different variants like this
<referenceContainer name="root"> <attribute name="class" value="my-css-class"/> </referenceContainer>
But nothing works.
Have you tried using htmlClass="new-class" ?
<referenceContainer name="my.container" htmlClass="new-class" />
For further details: https://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/xml-manage.html
Please accept my answer as Solution if I was able to help.