Sha256: f9bbab2518a155e6fe84b3fa1625b006d8e5869d19ee9d39265d2bf4acdb2dac

Contents?: true

Size: 1.55 KB

Versions: 3

Compression:

Stored size: 1.55 KB

Contents

// Mixins

// Media queries, based on: http://alwaystwisted.com/post.php?s=2013-04-01-my-media-query-mixin

@mixin mq($point, $query1: min, $query2: width){
  @media (#{$query1}-#{$query2}: $point){
    @content;
  }
}

// Centered elements

@mixin centered{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

// Drop Overlays

@mixin drop-overlay{
  content: "";
  position: absolute;
  z-index: $z2;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: rgba(#27353b, .6);
}

/// Slightly lighten a color
@function tint($color, $percentage){
  @return mix(white, $color, $percentage);
}

/// Slightly darken a color
@function shade($color, $percentage){
  @return mix(black, $color, $percentage);
}

// Status modifier mixin
$palette: $foundation-palette;

@mixin modifiers($vars, $colors: $palette){
  $map: map-merge($palette, $colors);

  @each $key, $value in $map{
    &.#{$key}{
      @content;

      @each $property in $vars{
        #{$property}: map-get($map, $key);
      }
    }
  }
}

@mixin flexgap($gap: 0, $dir: row){
  display: flex;
  flex-direction: $dir;

  @if $dir == row{
    & > *{
      margin: 0 $gap/2;
    }

    & > :first-child{
      margin-left: 0;
    }

    & > :last-child{
      margin-right: 0;
    }
  }

  @else if $dir == column{
    & > *{
      margin: $gap/2 0;
    }

    & > :first-child{
      margin-top: 0;
    }

    & > :last-child{
      margin-bottom: 0;
    }
  }
}

@mixin ellipsis(){
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: $global-lineheight;
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
decidim-core-0.11.2 app/assets/stylesheets/decidim/utils/_mixins.scss
decidim-core-0.11.1 app/assets/stylesheets/decidim/utils/_mixins.scss
decidim-core-0.11.0.pre1 app/assets/stylesheets/decidim/utils/_mixins.scss