0

Im trying to override the styles for the magento2 blank theme's top navigation. I set my structure same as blank theme has it, Theme->Magento_Theme->web->css->source->_module.less but it seems to be ignoring the override

My goal, I am creating a new theme based off of Blank theme and I want to add as little extra css as possible, so my thought was, I would copy the file from blank and add my css changes to that copy so it would load mine, which has the same code with my new additions.

Ive been successful at overriding the variables in my theme.less file but for some reason, this is not working as expected.

I am clearing cache, deleting my viewed process and static frontend, and running a static content deploy in dev mode.

0

Search where you have "_module.less" in Magento_Theme.

You have to import your source if it is not named _module.less or if you did not copy/pasted styles-m.less

@magento_import 'source/_module.less';

this could be missing by your side.

| improve this answer | |
  • Sorry, just to clarify, Where do I import the _module.less file? I currently have the same structure for my theme as blank theme, and it seems not to be making a difference, if i import it, wont it just add that imported css ontop of the default one? – gxrobb Jun 23 at 15:14
0

It seems the method I was employing was correct, however I needed to clear the whole of the static and processed folder. I was only clearing the one my theme was on and if I understand it correctly, that was not clearing the symlink.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.