App.less not overriding

as suggested last time, i am not adding any additional stylesheets but have been working on compiling, changing the .less files and adding any additional styles to app.less

however, not all of the css then overrides the default. for example - i set a: to text decoration none but it has no effect. another example was making the navbar brand 40% width. again no effect -

the main menu has a bg colour when i hover, but that disappears too.

all these worked fine when i had a separate style sheet enqued, but when i try to complile in .less its not having an effect.

I’m guessing its to do with the order of the cascade, but despite playing with multiple stylesheets, i can’t seem to fix.

there is no error in compiling.

If you are compiling manually (vs via using the grunt file) are you compiling into the main.min file?

yes - it all compiles into main.min.
I’m quite new to less so I think it will be to do with the cascade, and styles conflicting - i am having a good look through the less files to find where everything is.

i did find it easy to just write an overriding css file and enqueue it after but I was told this was not best practice!

My own stupid mistake - i forgot to change directory switching between sites - hence none of my changes were taking effect! (what happens when you are tired)

That happens all the time! :wink:

1 Like