I'm creating a new theme for a Magento 2.2.6 community edition and I need to wrap all the content inside a CSS class. To do so I had to change
<main id="maincontent" class="page-main">
<main id="maincontent" class="page-main myCustomWrapper">
To do that. I understand I need to change the line
<container name="main.content" htmlTag="main" htmlId="maincontent" htmlClass="page-main">
in the in the empty.xml file to
<container name="main.content" htmlTag="main" htmlId="maincontent" htmlClass="page-main myCustomWrapper">
I've tested that in the vendor/magento/module-theme/view/base/page_layout/empty.xml file and it worked. I then reverted and tried copying it to my theme. I followed the instructions here: Override base empty.xml file to rename the page-wrapper class and tried all possible combinations I could think about. Here the list of the files I tried:
They all inside my frontend theme, but none of the tested files worked.
Is my frontend theme working?
Yes. That was the first thing I tried. I changed it int the backend/admin, I changed the Magento_Theme/templates/html/header/logo.phtml and changes were shown in my site, so the theme does work.
Did I clean cache?
Yes, before refreshing the page, I did clean the cache and remove all files in pub/static/* var/view_preprocessed/ var/di/* var/generation/* after every change in all the possible */empty.xml.
I asked in the freenode channel, I looked in the magento stackexchange site, but nothing.
Any hints will really be appreciated.