css - Less can define the function like sass “@function” ? -
can less define functions sass, eg. @function
?
.px-to-percent(@px, @base){ @percent: unit(((@px / @base) * 100), %); } .myclass{ .px-to-percent(456, 1200); width: @percent; }
can less define functions sass, eg. @function
?
.px-to-percent(@px, @base){ @percent: unit(((@px / @base) * 100), %); } .myclass{ .px-to-percent(456, 1200); width: @percent; }
Comments
Post a Comment