Skipping an optional argument in Sass mixin

前端 未结 1 2057
礼貌的吻别
礼貌的吻别 2020-11-30 07:05

I have this mixin to handle a simple CSS3 linear gradient:

@mixin linear-gradient($from, $to, $dir: bottom, $dir-webki         


        
相关标签:
1条回答
  • 2020-11-30 07:55

    Starting from SASS 3.1 you can pass named arguments to do that:

    @include linear-gradient($from: #7a7a7a, $to: #1a1a1a, $ie-filters: true);
    

    The rest will be default.

    0 讨论(0)
提交回复
热议问题