Sha256: 4d210d4cf7c26abf88c0b5747f8e8d6578c780279ca5933d3cea319ae8acf237

Contents?: true

Size: 746 Bytes

Versions: 4

Compression:

Stored size: 746 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

4 entries across 4 versions & 1 rubygems

Version Path
flint-gs-2.0.6 stylesheets/flint/functions/lib/_steal-key.scss
flint-gs-2.0.5 stylesheets/flint/functions/lib/_steal-key.scss
flint-gs-2.0.4 stylesheets/flint/functions/lib/_steal-key.scss
flint-gs-2.0.3 stylesheets/flint/functions/lib/_steal-key.scss