Sha256: abcc49fb7e3c7771575f9f3d9ce094624c4221985b2e0382dc7989c8aef66a8d

Contents?: true

Size: 958 Bytes

Versions: 31

Compression:

Stored size: 958 Bytes

Contents

// Flex layout utilities
// require foundation
$space: $global-margin;
$spaces: $space ($space * 2);

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

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

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

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

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

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

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

// generates a gap simple and a double
@each $gap in $spaces{
  .flex-gap--#{strip-unit($gap)}{
    @include flexgap($gap: $gap);
  }
}

// flex--cc:
// justify-content: center;
// align-items: center;
.flex--cc{
  @include flex;
  @include flex-align($x: center, $y: middle);
}

// flex--sbc:
// justify-content: space-between;
// align-items: center;
.flex--sbc{
  @include flex;
  @include flex-align($x: justify, $y: middle);
}

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
decidim-admin-0.27.9 app/packs/stylesheets/decidim/admin/utils/_flex.scss
decidim-admin-0.27.8 app/packs/stylesheets/decidim/admin/utils/_flex.scss
decidim-admin-0.27.7 app/packs/stylesheets/decidim/admin/utils/_flex.scss
decidim-admin-0.27.6 app/packs/stylesheets/decidim/admin/utils/_flex.scss
decidim-admin-0.26.10 app/packs/stylesheets/decidim/admin/utils/_flex.scss
decidim-admin-0.26.9 app/packs/stylesheets/decidim/admin/utils/_flex.scss
decidim-admin-0.27.5 app/packs/stylesheets/decidim/admin/utils/_flex.scss
decidim-admin-0.26.8 app/packs/stylesheets/decidim/admin/utils/_flex.scss
decidim-admin-0.27.4 app/packs/stylesheets/decidim/admin/utils/_flex.scss
decidim-admin-0.27.3 app/packs/stylesheets/decidim/admin/utils/_flex.scss
decidim-admin-0.26.7 app/packs/stylesheets/decidim/admin/utils/_flex.scss
decidim-admin-0.26.5 app/packs/stylesheets/decidim/admin/utils/_flex.scss
decidim-admin-0.27.2 app/packs/stylesheets/decidim/admin/utils/_flex.scss
decidim-admin-0.27.1 app/packs/stylesheets/decidim/admin/utils/_flex.scss
decidim-admin-0.26.4 app/packs/stylesheets/decidim/admin/utils/_flex.scss
decidim-admin-0.27.0 app/packs/stylesheets/decidim/admin/utils/_flex.scss
decidim-admin-0.26.3 app/packs/stylesheets/decidim/admin/utils/_flex.scss
decidim-admin-0.27.0.rc2 app/packs/stylesheets/decidim/admin/utils/_flex.scss
decidim-admin-0.27.0.rc1 app/packs/stylesheets/decidim/admin/utils/_flex.scss
decidim-admin-0.26.2 app/packs/stylesheets/decidim/admin/utils/_flex.scss