// Text
.font-size(@size: 1.4rem){
    font-size: @size;
}

.line-height(@size: 1.4rem){
    line-height: @size;
}

.font-height(@size: 1.4rem) {
    .font-size(@size);
    .line-height(@size);
}

// Colors function
.set-bg-color (@color: transparent){background-color: @color !important;}
.set-fg-color (@color: transparent){color: @color !important;}
.set-ol-color (@color: transparent){outline-color: @color !important;}
.set-bd-color (@color: transparent){border-color: @color !important;}

.ribbed(@color: @white, @angle: -45deg, @size: 40px) {
    background-color: @color !important;
    background-image: -webkit-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
    background-image: -moz-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
    background-image: -ms-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
    background-image: -o-linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
    background-image: linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
    background-size: @size @size;
}

// Box
.size(@height, @width) {
    width: @width;
    height: @height;
}

.square(@size) {
    .size(@size, @size);
}

.box-sizing(@type) {
    -webkit-box-sizing: @type;
    -moz-box-sizing: @type;
    -ms-box-sizing: @type;
    -o-box-sizing: @type;
    box-sizing: @type;
}

.collapse (@collapce) {
    border-collapse: @collapce;
}

// Columns
.column-gap (@gap) {
    -moz-column-gap: @gap;
    -webkit-column-gap: @gap;
    -o-column-gap: @gap;
    -ms-column-gap: @gap;
    column-gap: @gap;
}

.columns (@columns) {
    -moz-columns: @columns;
    -webkit-columns: @columns;
    -o-columns: @columns;
    -ms-columns: @columns;
    columns: @columns;
    .column-gap(@unitSize);
}

// Grid functions
.spanX(@index){
    width: @gridColumnSize * @index + @gridGutterSize * (@index - 1) !important;
}
.offsetX(@index){
    margin-left: @gridColumnSize * @index + (@gridGutterSize * (@index));
    &:not(:first-child){
        margin-left: @gridColumnSize * @index + (@gridGutterSize * (@index + 1));
    }
}

.fluid-spanX(@index){
    width: @gridColumnSizeFluid * @index + (@gridGutterSizeFluid * (@index - 1)) !important;
}
.fluid-offsetX(@index){
    margin-left: @gridColumnSizeFluid * @index + (@gridGutterSizeFluid * (@index));
    &:not(:first-child){
        margin-left: @gridColumnSizeFluid * @index + (@gridGutterSizeFluid * (@index + 1));
    }
}

// Transform functions
.perspective(@perspective) {
    -webkit-transform: perspective(@perspective);
    -moz-transform: perspective(@perspective);
    -ms-transform: perspective(@perspective);
    -o-transform: perspective(@perspective);
    transform: perspective(@perspective);
}
.rotate(@degrees) {
    -webkit-transform: rotate(@degrees);
    -moz-transform: rotate(@degrees);
    -ms-transform: rotate(@degrees);
    -o-transform: rotate(@degrees);
    transform: rotate(@degrees);
}
.rotateX(@degrees) {
    -webkit-transform: rotateX(@degrees);
    -moz-transform: rotateX(@degrees);
    -ms-transform: rotateX(@degrees);
    -o-transform: rotateX(@degrees);
    transform: rotateX(@degrees);
}
.rotateY(@degrees) {
    -webkit-transform: rotateY(@degrees);
    -moz-transform: rotateY(@degrees);
    -ms-transform: rotateY(@degrees);
    -o-transform: rotateY(@degrees);
    transform: rotateY(@degrees);
}
.rotateZ(@degrees) {
    -webkit-transform: rotateZ(@degrees);
    -moz-transform: rotateZ(@degrees);
    -ms-transform: rotateZ(@degrees);
    -o-transform: rotateZ(@degrees);
    transform: rotateZ(@degrees);
}
.scale(@ratio) {
    -webkit-transform: scale(@ratio);
    -moz-transform: scale(@ratio);
    -ms-transform: scale(@ratio);
    -o-transform: scale(@ratio);
    transform: scale(@ratio);
}
.scaleX(@ratio) {
    -webkit-transform: scaleX(@ratio);
    -moz-transform: scaleX(@ratio);
    -ms-transform: scaleX(@ratio);
    -o-transform: scaleX(@ratio);
    transform: scaleX(@ratio);
}
.scaleY(@ratio) {
    -webkit-transform: scaleY(@ratio);
    -moz-transform: scaleY(@ratio);
    -ms-transform: scaleY(@ratio);
    -o-transform: scaleY(@ratio);
    transform: scaleY(@ratio);
}
.translate(@x: 0, @y: 0) {
    -webkit-transform: translate(@x, @y);
    -moz-transform: translate(@x, @y);
    -ms-transform: translate(@x, @y);
    -o-transform: translate(@x, @y);
    transform: translate(@x, @y);
}
.skew(@x: 0, @y: 0) {
    -webkit-transform: skew(@x, @y);
    -moz-transform: skew(@x, @y);
    -ms-transform: skew(@x, @y);
    -o-transform: skew(@x, @y);
    transform: skew(@x, @y);
}
.translate3d(@x: 0, @y: 0, @z: 0) {
    -webkit-transform: translate(@x, @y, @z);
    -moz-transform: translate(@x, @y, @z);
    -ms-transform: translate(@x, @y, @z);
    -o-transform: translate(@x, @y, @z);
    transform: translate(@x, @y, @z);
}

.transformOrigin(@origin) {
    -webkit-transform-origin: @origin;
    -moz-transform-origin: @origin;
    -ms-transform-origin: @origin;
    -o-transform-origin: @origin;
    transform-origin: @origin;
}

