Sha256: d2a79cb4d7960affd2767cc4c8bc5eff2b1ae0ad131b2a12de72503ee2ff50ed

Contents?: true

Size: 1.2 KB

Versions: 107

Compression:

Stored size: 1.2 KB

Contents

=assign-border-position($border-position, $border-values)
  #{if($border-position, border-#{$border-position}, border)}:
    @for $i from 1 through length($border-values)
      @if border-width(nth($border-values, $i))
        +rem('width', nth($border-values, $i))
      @else if border-style(nth($border-values, $i))
        style: nth($border-values, $i)
      @else if border-color(nth($border-values, $i))
        color: nth($border-values, $i)

// 使い方
// +border(vertical left, solid white 4px)
=border($value1: null, $value2: null)
  @for $i from 1 through length($value1)
    @if all(nth($value1, $i))
      +assign-border-position(false, $value2)
    @else if vertical(nth($value1, $i))
      $border-positions: $vertical
      @each $border-position in $border-positions
        +assign-border-position($border-position, $value2)
    @else if horizontal(nth($value1, $i))
      $border-positions: $horizontal
      @each $border-position in $border-positions
        +assign-border-position($border-position, $value2)
    @else if four_positions(nth($value1, $i))
      $border-positions: nth($value1, $i)
      @each $border-position in $border-positions
        +assign-border-position($border-position, $value2)

Version data entries

107 entries across 107 versions & 3 rubygems

Version Path
middleman-oulu-0.6.20 assets/stylesheets/settings/mixins/_border.sass
oulu-rails-0.6.20 vendor/assets/stylesheets/settings/mixins/_border.sass
oulu-rails-0.6.19 vendor/assets/stylesheets/settings/mixins/_border.sass
middleman-oulu-0.6.18 assets/stylesheets/settings/mixins/_border.sass
middleman-oulu-0.6.16 assets/stylesheets/settings/mixins/_border.sass
oulu-rails-0.6.16 vendor/assets/stylesheets/settings/mixins/_border.sass
oulu-rails-0.6.15 vendor/assets/stylesheets/settings/mixins/_border.sass
middleman-oulu-0.6.15 assets/stylesheets/settings/mixins/_border.sass
oulu-rails-0.6.14 vendor/assets/stylesheets/settings/mixins/_border.sass
oulu-rails-0.6.13 vendor/assets/stylesheets/settings/mixins/_border.sass
middleman-oulu-0.6.12 assets/stylesheets/settings/mixins/_border.sass
oulu-rails-0.6.12 vendor/assets/stylesheets/settings/mixins/_border.sass
oulu-rails-0.6.11 vendor/assets/stylesheets/settings/mixins/_border.sass
oulu-rails-0.6.10 vendor/assets/stylesheets/settings/mixins/_border.sass
middleman-oulu-0.6.10 assets/stylesheets/settings/mixins/_border.sass
middleman-oulu-0.6.9 assets/stylesheets/settings/mixins/_border.sass
middleman-oulu-0.6.8 assets/stylesheets/settings/mixins/_border.sass
middleman-oulu-0.6.7 assets/stylesheets/settings/mixins/_border.sass
middleman-oulu-0.6.6 assets/stylesheets/settings/mixins/_border.sass
middleman-oulu-0.6.5 assets/stylesheets/settings/mixins/_border.sass