Search code examples
asp.net-mvclessdotless

2 calls of a mixin less function with different parameters, have the same result


I call a mixin less function twice with different parameters but the result is the same and created by first parameters. There is a example:

Input:

.font-face (@fontName, @fontFileName)
{
    @font-face {
        font-family: @fontName;
        src: url("../../fonts/@{fontFileName}.eot");
        src: url("../../fonts/@{fontFileName}.eot?#iefix") format("embedded-opentype"),
             url("../../fonts/@{fontFileName}.woff") format("woff"),
             url("../../fonts/@{fontFileName}.ttf") format("truetype");
        font-weight: normal;
        font-style: normal;
    }
}

.font-face ("BMitra", "BMitra");
.font-face ("BMitraBold", "BMitraBold");

Output:

@font-face {
  font-family: "BMitra";
  src: url("../../fonts/BMitra.eot");
  src: url("../../fonts/BMitra.eot?#iefix") format("embedded-opentype"), url("../../fonts/BMitra.woff") format("woff"), url("../../fonts/BMitra.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: "BMitra";
  src: url("../../fonts/BMitra.eot");
  src: url("../../fonts/BMitra.eot?#iefix") format("embedded-opentype"), url("../../fonts/BMitra.woff") format("woff"), url("../../fonts/BMitra.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

What's the problem? I use dotless in a ASP .Net MVC 3.0 application.


Solution

  • Bad news: @media and @font-face support in LessCSS. '@font-face' is not really supported yet with LESS CSS :(