cancel
Showing results for 
Search instead for 
Did you mean: 

LESS variables not working.

LESS variables not working.

I've created a new theme. In my _extends.less file I've added the following assignments to exsiting LESS variables;

 

@_pager-item-display: block;
@_pager-label-display: inline-block;
@_pager-icon-use: false;
@_pager-icon-text-hide: false;

 

My understanding is that this should show "Previous" and "Next" labels on the page navigation. It doesn't however make any difference. Like so many other things with Magento I've found a dozen conflicting prices of advice and none of it works. How can I make use of the mixins and variables to style my theme?

2 REPLIES

Re: LESS variables not working.

You have 2 options:

You need to "compile" the less file in your server (http://lesscss.org/usage/index.html).

Add the script who do it in the browser. Read http://lesscss.org/ and search for "Client-side Usage"

OpenSource Expert | OpenSource Technologies | www.opensourcetechnologies.com
Magento plugins released: http://www.opensourcetechnologies.com/product/product-category/magento-extensions

Re: LESS variables not working.

Take a look at this page and see if it helps: http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-guide/css_quick_guide_approach.html

 

"Extending a theme using _extend.less is the simplest option when you are happy with everything the parent theme has, but want to add more styles."

 

I guess that if you want to change the variable you could do a override of that file in your theme.

Copy the original file into your theme and make the variable changes there.