// hint-mixins.scss
//
// Place to store common mixins.

// Vendor prefixer mixin.
@mixin vendor($property, $value) {
	-webkit-#{$property}: $value;
	-moz-#{$property}: $value;
	#{$property}: $value;
}

// mixin to set margin on tooltip using translate transform
// $property
@mixin set-margin($property, $transitionDirection, $translateX: 0) {
	$value: unquote(
		"#{$property}(#{$hintTransitionDistance * $transitionDirection})"
	);
	&:before {
		transform: $value rotate(var(--rotation));
	}
	&:after {
		@if $translateX != 0 {
			// For vertical tooltips, we need to animate in y-direction
			// retaining its x-transform.
			transform: translateX($translateX) $value;
		} @else {
			transform: $value;
		}
	}
}
