Tôi đã một Less
mixin định nghĩa là:Ít mixin với các thông số tùy chọn
.fontStyle(@family, @size, @weight: normal, @style: normal, @color: #ffffff, @letter-spacing: normal) {
font-family: @family;
font-size: @size;
color: @color;
font-weight: @weight;
font-style: @style;
letter-spacing: @letter-spacing;
}
Làm thế nào tôi có thể xác định việc sử dụng như:
.fontStyle('NimbusSansNovCon-Reg', 12px, , , , 0.1em);
I.E. sử dụng giá trị mặc định cho @weight
, @style
, @color