// どこでも font-weight と text-align と color と +top() が書ける設定
=text-block-options($value)
  font-weight: if(font_weight($value), $value, null)
  text-align: if(text_align($value), $value, null)
  color: if(color($value), $value, null)
  white-space: if(white_space($value), $value, null)
  display: if(display($value), $value, null)
  text-decoration: if(text_decoration($value), $value, null)

=letter-spacing-center($space-width: null)
  letter-spacing: $space-width
  text-indent: $space-width

// +text-block($font-size $line-height $margin-top $margin-bottom, $font-weight $text-align $color $top)
=text-block($value1: null, $value2: null)
  font-size: nth($value1, 1)
  line-height: optional_nth($value1, 2)
  margin-top: optional_nth($value1, 3)
  margin-bottom: optional_nth($value1, 4)
  @if ($value2)
    @for $i from 1 through length($value2)
      +text-block-options(nth($value2, $i))
      @if unit_number(nth($value2, $i))
        @if index($value2, center)
          letter-spacing: nth($value2, $i)
          text-indent: nth($value2, $i)
        @else
          letter-spacing: nth($value2, $i)

=open-face($color: black)
  text-shadow: $color 1px 1px 0, $color -1px -1px 0, $color -1px 1px 0, $color 1px -1px 0, $color 0px 1px 0, $color 0 -1px 0, $color -1px 0 0, $color 1px 0 0

=line-clamp($line-clamp: 2)
  display: -webkit-box
  -webkit-line-clamp: $line-clamp
  overflow: hidden
  -webkit-box-orient: vertical
