// Sizing shortcuts
.size(@width; @height) {
	width: @width;
	height: @height;
}

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

// Placeholder text
.placeholder(@color: @input-color-placeholder) {
	&:-moz-placeholder {
		color: @color;
	}
	// Firefox 4-18
	&::-moz-placeholder {
		color: @color;
	}
	// Firefox 19+
	&:-ms-input-placeholder {
		color: @color;
	}
	// Internet Explorer 10+
	&::-webkit-input-placeholder {
		color: @color;
	}
	// Safari and Chrome
}

// CSS image replacement
// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
.hide-text() {
	font: ~"0/0" a;
	color: transparent;
	text-shadow: none;
	background-color: transparent;
	border: 0;
}

// CSS3 PROPERTIES
// --------------------------------------------------

.border-radius (@radius: 5px) {
	-webkit-border-radius: @radius;
	-moz-border-radius:    @radius;
	border-radius:         @radius;
}

// Single side border-radius
.border-top-radius(@radius) {
	border-top-right-radius: @radius;
	border-top-left-radius: @radius;
}

.border-right-radius(@radius) {
	border-bottom-right-radius: @radius;
	border-top-right-radius: @radius;
}

.border-bottom-radius(@radius) {
	border-bottom-right-radius: @radius;
	border-bottom-left-radius: @radius;
}

.border-left-radius(@radius) {
	border-bottom-left-radius: @radius;
	border-top-left-radius: @radius;
}

// Drop shadows
.box-shadow(@shadow) {
	-webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1
	box-shadow: @shadow;
}

// Transitions
.transition(@transition) {
	-webkit-transition: @transition;
	transition: @transition;
}

.transition-delay(@transition-delay) {
	-webkit-transition-delay: @transition-delay;
	transition-delay: @transition-delay;
}

.transition-duration(@transition-duration) {
	-webkit-transition-duration: @transition-duration;
	transition-duration: @transition-duration;
}

.transition-transform(@transition) {
	-webkit-transition: -webkit-transform @transition;
	-moz-transition: -moz-transform @transition;
	-o-transition: -o-transform @transition;
	transition: transform @transition;
}

// Transformations
.rotate(@degrees) {
	-webkit-transform: rotate(@degrees);
	-ms-transform: rotate(@degrees); // IE9+
	-o-transform: rotate(@degrees);
	-moz-transform: rotate(@degrees);
	transform: rotate(@degrees);
}

.scale(@ratio) {
	-webkit-transform: scale(@ratio);
	-ms-transform: scale(@ratio); // IE9+
	transform: scale(@ratio);
}

.translate(@x; @y) {
	-webkit-transform: translate(@x, @y);
	-ms-transform: translate(@x, @y); // IE9+
	transform: translate(@x, @y);
}

.skew(@x; @y) {
	-webkit-transform: skew(@x, @y);
	-ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+
	transform: skew(@x, @y);
}

.translate3d(@x; @y; @z) {
	-webkit-transform: translate3d(@x, @y, @z);
	transform: translate3d(@x, @y, @z);
}

// Backface visibility
// Prevent browsers from flickering when using CSS 3D transforms.
// Default value is `visible`, but can be changed to `hidden`
// See git pull https://github.com/dannykeane/bootstrap.git backface-visibility for examples
.backface-visibility(@visibility){
	-webkit-backface-visibility: @visibility;
	-moz-backface-visibility: @visibility;
	backface-visibility: @visibility;
}

// Box sizing
.box-sizing(@boxmodel) {
	-webkit-box-sizing: @boxmodel;
	-moz-box-sizing: @boxmodel;
	box-sizing: @boxmodel;
}

// User select
// For selecting text on the page
.user-select(@select) {
	-webkit-user-select: @select;
	-moz-user-select: @select;
	-ms-user-select: @select; // IE10+
	-o-user-select: @select;
	user-select: @select;
}

// Opacity
.opacity(@opacity) {
	opacity: @opacity;
	// IE8 filter
	@opacity-ie: (@opacity * 100);
	filter: ~"alpha(opacity=@{opacity-ie})";
}

// Responsive image
//
// Keep images from scaling beyond the width of their parents.

.img-responsive(@display: block;) {
	display: @display;
	max-width: 100%; // Part 1: Set a maximum relative to the parent
	height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
}

