Sha256: 8a4c8ed6cb4545256ed94e13e8403aa38135dec3180eb212646ba7136115efe0

Contents?: true

Size: 1.45 KB

Versions: 52

Compression:

Stored size: 1.45 KB

Contents

// 使い方
// +border-radius(vertical, 4px)

=border-radius($value1: null, $value2: null)
  @if number(nth($value1, 1))
    +rem('border-radius', $value1)
  @else
    @for $i from 1 through length($value1)
      @if nth($value1, $i) == 'all'
        +rem('border-radius', $value2)
      @else if top(nth($value1, $i))
        +rem('border-top-left-radius', $value2)
        +rem('border-top-right-radius', $value2)
      @else if bottom(nth($value1, $i))
        +rem('border-bottom-left-radius', $value2)
        +rem('border-bottom-right-radius', $value2)
      @else if left(nth($value1, $i))
        +rem('border-top-left-radius', $value2)
        +rem('border-bottom-left-radius', $value2)
      @else if right(nth($value1, $i))
        +rem('border-top-right-radius', $value2)
        +rem('border-bottom-right-radius', $value2)

// 使い方
// +reset-border-radius(vertical, 4px)
=reset-border-radius($value: 'all')
  @for $i from 1 through length($value1)
    @if nth($value1, $i) == 'all'
      border-radius: 0
    @else if vertical(nth($value1, $i))
      border-top-radius: 0
      border-bottom-radius: 0
    @else if horizontal(nth($value1, $i))
      border-left-radius: 0
      border-right-radius: 0
    @else if top(nth($value1, $i))
      border-top-radius: 0
    @else if bottom(nth($value1, $i))
      border-bottom-radius: 0
    @else if left(nth($value1, $i))
      border-left-radius: 0
    @else if right(nth($value1, $i))
      border-right-radius: 0

Version data entries

52 entries across 52 versions & 3 rubygems

Version Path
oulu-0.9.4 app/assets/stylesheets/settings/mixins/_border-radius.sass
oulu-0.9.3 app/assets/stylesheets/settings/mixins/_border-radius.sass
oulu-0.9.2 app/assets/stylesheets/settings/mixins/_border-radius.sass
oulu-0.9.1 app/assets/stylesheets/settings/mixins/_border-radius.sass
oulu-0.9.0 app/assets/stylesheets/settings/mixins/_border-radius.sass
oulu-rails-0.8.4 vendor/assets/stylesheets/settings/mixins/_border-radius.sass
oulu-rails-0.8.3 vendor/assets/stylesheets/settings/mixins/_border-radius.sass
oulu-0.8.3 app/assets/stylesheets/settings/mixins/_border-radius.sass
oulu-0.8.2 app/assets/stylesheets/settings/mixins/_border-radius.sass
middleman-oulu-0.8.0 assets/stylesheets/settings/mixins/_border-radius.sass
oulu-rails-0.8.0 vendor/assets/stylesheets/settings/mixins/_border-radius.sass
middleman-oulu-0.7.7 assets/stylesheets/settings/mixins/_border-radius.sass
oulu-rails-0.7.6 vendor/assets/stylesheets/settings/mixins/_border-radius.sass
oulu-rails-0.7.5 vendor/assets/stylesheets/settings/mixins/_border-radius.sass
oulu-rails-0.7.4 vendor/assets/stylesheets/settings/mixins/_border-radius.sass
oulu-rails-0.7.3 vendor/assets/stylesheets/settings/mixins/_border-radius.sass
middleman-oulu-0.7.6 assets/stylesheets/settings/mixins/_border-radius.sass
middleman-oulu-0.7.4 assets/stylesheets/settings/mixins/_border-radius.sass
middleman-oulu-0.7.3 assets/stylesheets/settings/mixins/_border-radius.sass
middleman-oulu-0.7.2 assets/stylesheets/settings/mixins/_border-radius.sass