How can I use a less variable to give the source address?

1

In my less file I have a variable named @address with the main address where the fonts are, I have several fonts and I need the directory at all with that variable , but it does not work.

One of the lesser fonts

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  src: local("Segoe UI"), local("Open Sans"), local("OpenSans"), url(@@address/ui/lib/fonts/opensans/v8/K88pR3goAWT7BTt32Z01mz8E0i7KZn-EPnyo3HZu7kw.woff) format('woff');

In url(@@address/ui/lib/.....) I need to be the value of the variable! How can I do this, why is not working?

    
asked by anonymous 12.04.2016 / 17:11

1 answer

2

Use @{nome_da_variavel} :

For example:

@address: "/ui/lib/fonts/opensans/v8";

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  src: local("Segoe UI"),
       local("Open Sans"),
       local("OpenSans"),
       url("@{address}/K88pR3goAWT7BTt32Z01mz8E0i7KZn-EPnyo3HZu7kw.woff") format('woff');
}
    
12.04.2016 / 17:27