Less mixin with optional parameters

前端 未结 2 2025
感动是毒
感动是毒 2020-12-10 00:45

I have a Less mixin defined as:

.fontStyle(@family, @size, @weight: normal, @style: normal, @color: #ffffff, @letter-spacing: normal) {
  font-f         


        
2条回答
  •  星月不相逢
    2020-12-10 01:25

    See the documentation

    http://lesscss.org/features/#mixins-parametric-feature-mixins-with-multiple-parameters

    Note: you should get in the habit of using semicolons to separate parameters since some css values can contain commas.

提交回复
热议问题