Using multiple conditions (AND) in SASS IF statement

后端 未结 2 1216
闹比i
闹比i 2020-12-12 19:17

Using SASS, I would like to have multiple condition in IF statement

What I use right now :

@function color-x ($alpha) {
    @if             


        
2条回答
  •  旧巷少年郎
    2020-12-12 19:32

    You can also do:

    @if index("foo" "bar", $value) { .. }
    

    Beware though:

    1. It might not be quite obvious what you are trying to do.
    2. It returns a number or null, not a boolean.

提交回复
热议问题