Sha256: 2b636015ce5872822e56e39f8ad076feb534b71ef4f07334a1478a00fc05fb31

Contents?: true

Size: 1.28 KB

Versions: 15

Compression:

Stored size: 1.28 KB

Contents

///
/// Calculate breakpoint query
///
/// @access private
///
/// @param {String} $type - type of query to get
/// @param {String} $key  - key of breakpoint
/// @param {Number} $i    - index of current breakpoint
///
/// @return {Number} - breakpoint value
///
/// @group Internal Functions
///
@function flint-calc-breakpoint($type, $key, $i) {

    @if $type == "alias" {

        @if flint-get-value("settings", "grid") == "fixed" {
            @if flint-is-lowest-breakpoint($key) {
                @return 0;
            } @else {
                @return flint-get-value("breakpoints", $key, "breakpoint");
            }
        } @else if flint-get-value("settings", "grid") == "fluid" {
            @return flint-get-value("breakpoints", $key, "breakpoint");
        }

    } @else if $type == "next" {

        @if flint-is-lowest-breakpoint($key) {
            @return 0;
        } @else {
            @return flint-get-value("breakpoints", flint-steal-key(($i + 1)), "breakpoint");
        }

    } @else if $type == "prev" {

        @if flint-is-highest-breakpoint($key) {
            @return flint-get-value("breakpoints", $key, "breakpoint");
        } @else {
            @return flint-get-value("breakpoints", flint-steal-key(($i - 1)), "breakpoint");
        }

    }

    @return false;
}

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
flint-gs-2.3.6 stylesheets/flint/functions/lib/_calc-breakpoint.scss
flint-gs-2.3.5 stylesheets/flint/functions/lib/_calc-breakpoint.scss
flint-gs-2.3.4 stylesheets/flint/functions/lib/_calc-breakpoint.scss
flint-gs-2.3.3 stylesheets/flint/functions/lib/_calc-breakpoint.scss
flint-gs-2.3.2 stylesheets/flint/functions/lib/_calc-breakpoint.scss
flint-gs-2.3.1 stylesheets/flint/functions/lib/_calc-breakpoint.scss
flint-gs-2.3.0 stylesheets/flint/functions/lib/_calc-breakpoint.scss
flint-gs-2.2.0 stylesheets/flint/functions/lib/_calc-breakpoint.scss
flint-gs-2.1.4 stylesheets/flint/functions/lib/_calc-breakpoint.scss
flint-gs-2.1.3 stylesheets/flint/functions/lib/_calc-breakpoint.scss
flint-gs-2.1.2 stylesheets/flint/functions/lib/_calc-breakpoint.scss
flint-gs-2.1.1 stylesheets/flint/functions/lib/_calc-breakpoint.scss
flint-gs-2.1.0 stylesheets/flint/functions/lib/_calc-breakpoint.scss
flint-gs-2.0.9 stylesheets/flint/functions/lib/_calc-breakpoint.scss
flint-gs-2.0.8 stylesheets/flint/functions/lib/_calc-breakpoint.scss