Sha256: 6f39934b375ecff6a1b1d35d79a4b8c89f6f38c93e4b8b3f365c39064413ceb4

Contents?: true

Size: 1.1 KB

Versions: 4

Compression:

Stored size: 1.1 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
 *
 * @group Internal Functions
 */
@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

4 entries across 4 versions & 1 rubygems

Version Path
flint-gs-2.0.6 stylesheets/flint/functions/lib/_support-syntax.scss
flint-gs-2.0.5 stylesheets/flint/functions/lib/_support-syntax.scss
flint-gs-2.0.4 stylesheets/flint/functions/lib/_support-syntax.scss
flint-gs-2.0.3 stylesheets/flint/functions/lib/_support-syntax.scss