Sha256: 2f605afaecc20472c0e106dddb4e6fbab18b53e3399fc95ae32eafcb2e758364

Contents?: true

Size: 704 Bytes

Versions: 2

Compression:

Stored size: 704 Bytes

Contents

@mixin center_container_horizontal {
  text-align: center;
  & > * {
    display: inline-block;
    text-align: left;
  }
}

// http://www.jakpsatweb.cz/css/css-vertical-center-solution.html
@mixin center_container_vertical {
  display: table;
  position: static;

  & > * {
    display: table-cell;
    vertical-align: middle;
    width: 100%;
  }
}

/*
http://css-tricks.com/centering-in-the-unknown/
Changes the parent
*/
@mixin center_container {
  text-align: center;
  &:before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
    margin-right: -0.25em; /* Adjusts for spacing */
  }

  & > * {
    display: inline-block;
    vertical-align: middle;
  }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
patterns-0.1.7 app/assets/stylesheets/alignment/_center.scss
patterns-0.1.6 app/assets/stylesheets/alignment/_center.scss