All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.liferay._respond_to.scss Maven / Gradle / Ivy

There is a newer version: 6.0.18
Show newest version
// @deprecated As of Mueller (7.2.x)
@mixin respond-to($types...) {
	$maxWidth: -1;
	$minWidth: -1;

	@each $type in $types {
		@if $type == phone {
			$maxWidth: if($maxWidth == -1, $breakpoint_phone - 1, $maxWidth);
			$minWidth: 0;
		} @else if $type == tablet {
			@if $maxWidth != 0 {
				$maxWidth: if(
					$maxWidth == -1,
					$breakpoint_tablet - 1,
					max($breakpoint_tablet - 1, $maxWidth)
				);
			}

			$minWidth: if(
				$minWidth == -1,
				$breakpoint_phone,
				min($breakpoint_phone, $minWidth)
			);
		} @else if $type == desktop {
			$maxWidth: 0;
			$minWidth: if($minWidth == -1, $breakpoint_tablet, $minWidth);
		}
	}

	@if $maxWidth <= 0 and $minWidth <= 0 {
		@content;
	} @else if $maxWidth <= 0 {
		@media (min-width: $minWidth) {
			@content;
		}
	} @else if $minWidth <= 0 {
		@media (max-width: $maxWidth) {
			@content;
		}
	} @else {
		@media (min-width: $minWidth) and (max-width: $maxWidth) {
			@content;
		}
	}

	@warn "respond-to has been deprecated as of 7.2. It will be removed entirely in 7.3";
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy