Sha256: 57ded61a2709c4b8471b833530cf2994a9d780b416227587173d21fa8e82fcf1

Contents?: true

Size: 1.24 KB

Versions: 5

Compression:

Stored size: 1.24 KB

Contents

// どこでも 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)

// +text-block($font-size $line-height $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-bottom: optional_nth($value1, 3)
  @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)

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

=small-font($font-size)
  // 9px以下のfont-sizeを使う設定(IE8不可)
  transform: scale3d(strip_unit($font-size / 10), strip_unit($font-size/ 10), 1)
  transform-origin: 0 0

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
oulu-0.11.4 app/assets/stylesheets/settings/mixins/_text.sass
oulu-0.11.3 app/assets/stylesheets/settings/mixins/_text.sass
oulu-0.11.2 app/assets/stylesheets/settings/mixins/_text.sass
oulu-0.11.1 app/assets/stylesheets/settings/mixins/_text.sass
oulu-0.11.0 app/assets/stylesheets/settings/mixins/_text.sass