Sha256: 48348e9a25d1c8183b24b320afcd600349f46fc456fb4834b81f3af02896b16f

Contents?: true

Size: 1.11 KB

Versions: 6

Compression:

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

6 entries across 6 versions & 1 rubygems

Version Path
flint-gs-2.3.4 stylesheets/flint/functions/lib/_support-syntax.scss
flint-gs-2.3.3 stylesheets/flint/functions/lib/_support-syntax.scss
flint-gs-2.3.2 stylesheets/flint/functions/lib/_support-syntax.scss
flint-gs-2.3.1 stylesheets/flint/functions/lib/_support-syntax.scss
flint-gs-2.3.0 stylesheets/flint/functions/lib/_support-syntax.scss
flint-gs-2.2.0 stylesheets/flint/functions/lib/_support-syntax.scss