Sha256: e06d0a01e6d5e0d7c42ae11200663f5ceb1649cca49b22fe463e000622372dcd

Contents?: true

Size: 1.07 KB

Versions: 1

Compression:

Stored size: 1.07 KB

Contents

/**
 * Support syntax
 *
 * @access private
 *
 * @param {String} $syntax    - alias of syntax to support
 * @param {List}   $selectors - string of selectors to parse
 *
 * @return {List} - list of parsed selectors according to syntax
 */
@function flint-support-syntax($syntax, $selectors) {
    $syntax: to-lower-case($syntax);

    // Make sure syntax is supported
    @if function-exists("flint-support-syntax-#{$syntax}") {

        // Support syntax
        //
        // WARNING: Be sure you have created a custom function to support an unknown syntax
        @return call("flint-support-syntax-#{$syntax}", $selectors);

    } @else {
        @if not $flint__development-mode {
            // Throw error if the syntax does not exist and a function to call cannot be found
            @error "You did not pass a valid syntax to `flint-support-syntax`: #{$syntax}. Either specify a custom `flint-support-syntax-<syntax>` function to call, or use one of the offically supported syntaxes. For more info, please visit the docs.";
        } @else {
            @return false;
        }
    }
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flint-gs-2.0.2 stylesheets/flint/functions/lib/_support-syntax.scss