/* -----------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

utilities/mixins-layout.less

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
----------------------------------------------------------------------------- */






/* -----------------------------------------------------------------------------
--------------------------------------------------------------------------------

Clearfix

--------------------------------------------------------------------------------
----------------------------------------------------------------------------- */

.clearfix {

    *zoom: 1;

    &:before,
    &:after {

        display: table;
        content: "";
        line-height: 0;

    }

    &:after {

        clear: both;

    }

}






/* -----------------------------------------------------------------------------
--------------------------------------------------------------------------------

IE7 Fixes

--------------------------------------------------------------------------------
----------------------------------------------------------------------------- */

.ie7-inline-block() {

    *display: inline;
    *zoom: 1;

}

.ie7-restore-left-whitespace() {

    *margin-left: .3em;

    &:first-child {

        *margin-left: 0;

    }

}

.ie7-restore-right-whitespace() {

    *margin-right: .3em;

}






/* -----------------------------------------------------------------------------
--------------------------------------------------------------------------------

Focus

--------------------------------------------------------------------------------
----------------------------------------------------------------------------- */

.tab-focus() {

    outline: thin dotted #333;
    outline: 5px auto -webkit-focus-ring-color;
    outline-offset: -2px;

}






/* -----------------------------------------------------------------------------
--------------------------------------------------------------------------------

Center Block Elements

--------------------------------------------------------------------------------
----------------------------------------------------------------------------- */

.center-block() {

    display: block;
    margin-left: auto;
    margin-right: auto;

}






/* -----------------------------------------------------------------------------
--------------------------------------------------------------------------------

Sizing

--------------------------------------------------------------------------------
----------------------------------------------------------------------------- */

.size(@width; @height) {

    width: @width;
    height: @height;
    behavior: url("@{css3pie-path}PIE.php");

}

.square(@size) {

    .size(@size; @size);

}

.backface-visibility(@visibility){

  backface-visibility: @visibility;

}

.background-clip(@clip) {

  background-clip: @clip;

}

.background-size(@size) {

  background-size: @size;

}

.box-sizing-padding-vertical(@height, @content-height) when (@height > @content-height) {

  padding-top: ((@height - @content-height) / 2);
  padding-bottom: ((@height - @content-height) / 2);

}

.box-sizing-padding-vertical(@height, @content-height) when (@height <= @content-height) {

  padding-top: 0px;
  padding-bottom: 0px;

}






/* -----------------------------------------------------------------------------
--------------------------------------------------------------------------------

Transformations

--------------------------------------------------------------------------------
----------------------------------------------------------------------------- */

.transform(@transform) {

  transform: @transform;

}

.rotate(@degrees) {

  transform: rotate(@degrees);

}

.scale(@ratio) {

  transform: scale(@ratio);

}

.scale(@ratio-x, @ratio-y) {

  transform: scale(@ratio-x, @ratio-y);

}

.scale3d(@ratio-x, @ratio-y, @ratio-z) {

  transform: scale3d(@ratio-x, @ratio-y, @ratio-z);

}

.translate(@x, @y) {

  transform: translate(@x, @y);

}

.translateX(@x) {

  transform: translateX(@x);

}

.translateY(@y) {

  transform: translateY(@y);

}

.translateZ(@z) {

  transform: translateZ(@z);

}

.skew(@x, @y) {

  transform: skew(@x, @y);
  backface-visibility: hidden;

}

.translate3d(@x, @y, @z) {

  transform: translate3d(@x, @y, @z);

}
