0

I'm trying to customise my theme but only a few variables seem to be displayed on my web page. I'm not sure that I am using the variables in vendor/magento/theme-frontend-luma/web/css/source . Any help would be much appreciated.

My .less file

@oh-my-blue:#FFC0CB;  
@green:#7CFC00;
body
{
background-color:@oh-my-blue;  <-- Works
border-color:@green;            <-- Doesn't Works
link__color:@green;              <-- Doesn't Works

}
  • Where are you changing this code? – Vivek Kumar Aug 23 '18 at 17:18
  • app\code\Pulsestorm\StartingWithLess\view\frontend\web – Greg Aug 24 '18 at 7:53
1

Its unclear exactly what you are trying to do.

link__color:@green; is bad less because link__color: #7CFC00; is invalid css. It won't break anything as far as I know but neither will it do anything.

If you are trying to change your @link__color variable, you would do the following @link__color:@green; (outside of the body {} delcaration)

The reason your border-color doesn't work, I suspect, is because your body element most likely doesn't have a border. Again I think you were trying to change a variable.

Treat your less like css and you should be ok, variables are for convenience but in my opinion just writing css is sometimes easier. I get the impression you may need to clarify your understanding of css first, I would start there and just stick to css before getting into writing less.

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.