//
// @author      OA Wu <oawu.tw@gmail.com>
// @copyright   Copyright (c) 2015 - 2025, @oawu/scss
// @license     http://opensource.org/licenses/MIT  MIT License
// @link        https://www.ioa.tw/
//

@function commaList($list: ()) {
  @return join((), $list, comma);
}

@function compact($vars...) {
  $list     : ();
  $separator: list-separator($vars);

  @each $var in $vars {
    @if $var {
      $list: append($list, $var, $separator);
    }
  }

  @return $list;
}

@mixin prefix($property, $value, $o: true, $ms: true, $moz: true, $webkit: true, $official: true) {
  @if $webkit   { -webkit-#{$property}: $value; }
  @if $moz      {    -moz-#{$property}: $value; }
  @if $ms       {     -ms-#{$property}: $value; }
  @if $o        {      -o-#{$property}: $value; }
  @if $official {         #{$property}: $value; }
}

@mixin suffix($property, $value, $o: true, $ms: true, $moz: true, $webkit: true, $official: true) {
  @if $webkit   { #{$property}: -webkit-#{$value}; }
  @if $moz      { #{$property}:    -moz-#{$value}; }
  @if $ms       { #{$property}:     -ms-#{$value}; }
  @if $o        { #{$property}:      -o-#{$value}; }
  @if $official { #{$property}:         #{$value}; }
}
