S
S
Sasha2017-09-06 09:38:04
Layout
Sasha, 2017-09-06 09:38:04

How to use the X argument of @mixin multiple times on the same element?

Good afternoon!
There is a sass mixin to use transition:

@mixin transition-base($property:false){
    @if(not $property){
        transition:all 250ms ease 0s;
    }
    @else{
        transition:$property 250ms ease 0s;
    }
}

Can you please tell me how to use the argument several times on the same element? The logic is something like this:$property
.text{
    @include transition-base($property:padding, $property:color);
}

I'm aiming for this final code:
transition:padding 250ms ease 0s, color 250ms ease 0s;

Thank you!
upd
When using such a set
@include transition-base(padding, color, border-color);

Generates almost what is needed, only in the first values ​​instead of 250ms it generates 0s
transition:padding 0s ease 0s, color 0s ease 0s, border-color 250ms ease 0s;

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question