Sha256: 2c9e14bc8afbd75c227607b1b766c3c03659da58c94b96573638fda0563cfbff

Contents?: true

Size: 755 Bytes

Versions: 7

Compression:

Stored size: 755 Bytes

Contents

///
/// Steal breakpoint key by index
///
/// @access private
///
/// @param {Number} $index - index of key
///
/// @return {String}
///
/// @group Internal Functions
///
@function flint-steal-key($index) {
	$length: length(map-keys(flint-get-value("breakpoints")));

	@if not flint-is-number($index) {
		@if not $flint__development-mode {
			@error "Passed $index (#{$index}) is not a number. Function takes index number of breakpoint key.";
		} @else {
			@return false;
		}
	}

	@if $index > $length {
		@if not $flint__development-mode {
			@error "Passed $index (#{$index}) is greater than the length of the config map.";
		} @else {
			@return false;
		}
	}

	@return if($index != 0, nth(map-keys(flint-get-value("breakpoints")), $index), false);
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
flint-gs-2.1.4 stylesheets/flint/functions/lib/_steal-key.scss
flint-gs-2.1.3 stylesheets/flint/functions/lib/_steal-key.scss
flint-gs-2.1.2 stylesheets/flint/functions/lib/_steal-key.scss
flint-gs-2.1.1 stylesheets/flint/functions/lib/_steal-key.scss
flint-gs-2.1.0 stylesheets/flint/functions/lib/_steal-key.scss
flint-gs-2.0.9 stylesheets/flint/functions/lib/_steal-key.scss
flint-gs-2.0.8 stylesheets/flint/functions/lib/_steal-key.scss