Sha256: efc1f9194f087b91c333e1535fc1f867582e751256d566492f8b4f5ab8f34aa2

Contents?: true

Size: 1.83 KB

Versions: 2

Compression:

Stored size: 1.83 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

// brをアクティブにするサイズを設定
=br($active-sizes)
  br
    display: none
    @if ($active-sizes)
      @for $i from 1 through length($active-sizes)
        @if nth($value1, $i) == xs
          +screen-xs
            display: block
        @else if nth($value1, $i) == sm
          +screen-sm
            display: block
        @else if nth($value1, $i) == md
          +screen-md
            display: block
        @else if nth($value1, $i) == lg
          +screen-md
            display: block
        @else if nth($value1, $i) == xl
          +screen-md
            display: block

=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

2 entries across 2 versions & 1 rubygems

Version Path
oulu-0.10.1 app/assets/stylesheets/settings/mixins/_text.sass
oulu-1.0.0.beta1 app/assets/stylesheets/settings/mixins/_text.sass