I'm working on a Magento 2 site at the moment for a client. Suppose my client's brand is boofar
and the theme I'm trying to extend/override is foobar
I've set as the parent theme using frontend/Foobarthemes/boofar/theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Boofar</title>
<parent>Foobarthemes/foobar1</parent>
<media>
<preview_image>media/preview.jpg</preview_image>
</media>
Then under frontend/Foobarthemes/boofar/web/css/source/_theme.less
I've written the CSS code that I want to override. I have also tried this with _extend.less
.
.magicmenu {
.home {
display: none !important;
}
.nav-desktop .level0 .level-top > span {
font-size: 12px;
font-weight: normal;
text-transformation: none;
}
}
I'm forced to use !important
for anything to work here. None of the font and text stuff works in the above code.
Have I not understood the Magento 2 frontend workflow correctly?