Skip to Content
Menu

supports()

A shortcut method for support queries.

Sass February 22, 2017

Usage

Sass
supports($property, $value)

Parameters

$property
(Required) (String) The property to test
Default: None

$value
(Required) (String) The value to use if supported
Default: None

Request or provide clarification »

Examples

Sass
.element {@include supports(box-shadow, 2px 2px 2px black);}
Was this page helpful? Yes No


    A feedback message is required to submit this form.


    Please check that you have entered a valid email address.

    Enter your email address if you would like a response.

    Thank you for your feedback!

    Source File

    Located in /assets/scss/partials/_mixins.scss on line 219.

    Note: This function contains 1 to-do comment.

    Sass
    @mixin supports($property, $value){ //@TODO "Nebula" 0: Ideally the property and value would be passed as a single variable: supports(box-shadow: 2px 2px 2px black);
        @supports ($property $value){
            & {#{$property}: $value}
        }
    }
    

    Override

    To override or disable this, redefine the mixin/function later on, or use different class names to prevent this from targeting your element.

    Sass
    @mixin supports($property, $value){
        //Write your own code here, leave it blank, or return false.
    }