Sha256: 37ed40ca4516fcdae45e2451277628238a17195d304bae9e4e5b575dd7d375cc

Contents?: true

Size: 890 Bytes

Versions: 6

Compression:

Stored size: 890 Bytes

Contents

// /**
//  * Copyright (C) 2013 Crossing Hippos - Babs Gösgens. All rights reserved.
//  * Licensed under GNU General Public License version 2 or later; see LICENSE.txt
//  */
@if $trace-imports { @debug 'imported'; }

// Expects a nested array of valid expressions, for example
// $properties: (min-width,100px),(orientation,landscape)
// Use false if a value should not be rendered (0 is a valid value)
@mixin breakpoint($properties, $media: 'only screen')
{
	@if $properties {

		$query: '';

		@if length(nth($properties,1))>1{
			@each $property in $properties {
				$name: nth($property,1);
				$value: nth($property,2);
				@if $value {
					$query: '#{$query} and (#{$name}: #{$value})';
				}
			}
		}
		@else {
			$name: nth($properties,1);
			$value: nth($properties,2);
			$query: '#{$query} and (#{$name}: #{$value})';
		}

		@media #{$media} #{$query} {
			@content;
		}
	}
}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
persistentgrid-0.0.1.beta.10 scss/pg/helpers/_breakpoints.scss
persistentgrid-0.0.1.beta.9 scss/pg/helpers/mixins/_breakpoints.scss
persistentgrid-0.0.1.beta.8 scss/pg/helpers/mixins/_breakpoints.scss
persistentgrid-0.0.1.beta.3 scss/pg/helpers/mixins/_breakpoints.scss
persistentgrid-0.0.1.beta.2 scss/pg/helpers/mixins/_breakpoints.scss
persistentgrid-0.0.1.beta.1 scss/pg/helpers/mixins/_breakpoints.scss