Last active
October 12, 2018 13:05
-
-
Save AndreaRivadossi/f03eba32d0fc8454c2c1b2897c8d6bca to your computer and use it in GitHub Desktop.
Magento 2 - Add a CSS class to the body element
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!-- | |
/** | |
* Copyright © Magento, Inc. All rights reserved. | |
* See COPYING.txt for license details. | |
*/ | |
--> | |
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" label="Customer My Account (All Pages)" design_abstraction="custom"> | |
<body> | |
<attribute name="class" value="account"/> | |
</body> | |
</page> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<referenceContainer name="root" htmlTag="div" htmlClass="my-custom-css-class" htmlId="my-custom-css-id"> | |
</referenceContainer> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" label="Customer My Account (All Pages)" design_abstraction="custom"> | |
<body> | |
<attribute name="class" value="my-custom-css-class"/> | |
</body> | |
</page> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment