Sha256: f8ca06790b30983eb092b636df7e4410d91674d5e759b66e4a0e5a2deafb374a

Contents?: true

Size: 1.18 KB

Versions: 1

Compression:

Stored size: 1.18 KB

Contents

// Support syntax
// -------------------------------------------------------------------------------
// @param $syntax [string] : alias of syntax to support
// @param $selectors [string] : 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 {

        // Throw error if the syntax does not exist and a function to call cannot be found
        @warn "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.";
        @return null;

    }
}

Version data entries

1 entries across 1 versions & 1 rubygems

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