Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS best way to add Google web fonts with LESS? Re: best way to add Google web fonts with LESS?

#121698
Kitty Giraudel
Participant

I’ve been struggling on it during an hour and unfortunately I couldn’t find a working solution.

My idea was to do something like this.

@my-font: “Merriweather”;
@url: “http://fonts.googleapis.com/css?family=@{my-font}”;
@import url(@url);

.selector { font-family: @my-font; }

Sadly, LESS is:
* Really buggy with url()
* Really annoying with string concatenation
* Really shitty when mixing url() and string concatenation

So… Sorry mate, I’ve no solution to provide. :(