// hide
//
// Removes content from the page using four different techniques.
//
// $how - Specifies which kind of technique used to hide content. Accepts `visually`, `invisible`, `hidden`, or `remove` as an argument. Defaults to `visually`.
//
// Styleguide Logic.Mixins.hide
@mixin hide($how: visually) {
	// Hide only visually, but have it available for screen readers: http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
	@if ($how == "visually") {
		border: 0;
		clip: rect(0 0 0 0);
		height: 1px;
		margin: -1px;
		overflow: hidden;
		padding: 0;
		position: absolute;
		white-space: nowrap;
		width: 1px;

		// Allow element to be focusable when navigated to via the keyboard: https://www.drupal.org/node/897638
		&:focus {
			clip: auto;
			height: auto;
			margin: 0;
			overflow: visible;
			position: static;
			width: auto;
		}
	}
	// Hide visually and from screen readers, but maintain layout
	@else if ($how == "hidden") {
		visibility: hidden !important;
	}
	// Maintain layout, but make fully transparent
	@else if ($how == "invisible") {
		opacity: 0;
	}
	// Completely remove content
	@else if ($how == "remove") {
		display: none;
	} @else {
		@error "`#{$how}` + is an invalid argument. Please use `visually`, `invisible`, `hidden`, or `remove`";
	}
}
