I am creating a custom admin theme for Magento 2 and followed the Magento 2 documentation. My problem is that all styles are removed on the backend and I do not understand why it is not defaulting to Magento/backend theme parent. Here is my theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>MyTheme</title>
<parent>Magento/backend</parent>
<media>
<preview_image>media/preview.png</preview_image>
</media>
Here is my module.xml:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Vendor_MenuItem" setup_version="1.0.0" />
</config>
and my added di.xml to my module:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<!-- Admin theme. Start -->
<type name="Magento\Theme\Model\View\Design">
<arguments>
<argument name="themes" xsi:type="array">
<item name="adminhtml" xsi:type="string">Vendor/MyTheme</item> <!-- Example: "Magento/backend" -->
</argument>
</arguments>
</type>
<!-- Admin theme. End -->
</config>
The logo works just fine but I lost all previous styling and all adminhtml looks like basic html. Any insight would be appreciated.
module.xml
file, did you add sequence parameter to loadMagento_Theme
first?